@import url('https://fonts.googleapis.com/css2?family=Yuji+Syuku&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-main: #1C3C67;
  --color-accent: #B12757;
  --color-quality: #D3BD27;
  --color-quick: #F287B6;
  --color-quest: #2190A5;
  --color-bg: #f8f9fa;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #e0e0e0;
  --spacing-unit: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-fade {
  opacity: 0;
  transition: none;
}

.scroll-fade.is-visible {
  animation: scrollFadeIn 1.2s ease-out forwards;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 2);
}

.header-container {
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
}

.logo a {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.logo a:hover {
  opacity: 0.8;
}

.logo-tagline {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.logo-image {
  height: 50px;
  width: auto;
  display: block;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: calc(var(--spacing-unit) * 1);
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--color-main);
  margin: 3px 0;
  transition: 0.3s;
}

.nav-menu {
  margin-left: auto;
  padding-right: calc(var(--spacing-unit) * 4);
}

.nav-menu ul {
  display: flex;
  list-style: none;
  gap: calc(var(--spacing-unit) * 1);
  justify-content: flex-end;
}

.nav-menu a {
  color: var(--color-main);
  text-decoration: none;
  padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 1.5);
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 1);
  overflow: hidden;
}

.nav-menu a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-menu a:hover {
  background-color: rgba(28, 60, 103, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  color: var(--color-accent);
}

.nav-menu a:hover::before {
  width: 100%;
}

.menu-icon {
  width: 20px;
  height: 20px;
  stroke: var(--color-main);
  transition: all 0.3s ease;
}

.nav-menu a:hover .menu-icon {
  stroke: var(--color-accent);
  transform: translateY(-2px);
}

.menu-text {
  font-weight: 500;
}

.footer-container {
  background-color: var(--color-main);
  color: white;
  margin-top: calc(var(--spacing-unit) * 8);
}

.footer-main {
  padding: calc(var(--spacing-unit) * 8) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: calc(var(--spacing-unit) * 6);
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: calc(var(--spacing-unit) * 3);
  padding-bottom: calc(var(--spacing-unit) * 1);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.footer-logo-wrap {
  background-color: white;
  padding: calc(var(--spacing-unit) * 2);
  border-radius: 8px;
  display: inline-block;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.footer-logo {
  height: 50px;
  width: auto;
  display: block;
}

.footer-tagline {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.9;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s ease;
  display: inline-block;
}

.footer-links a:hover {
  opacity: 0.7;
  transform: translateX(4px);
}

.footer-info p {
  margin-bottom: calc(var(--spacing-unit) * 2);
  line-height: 1.6;
  opacity: 0.9;
}

.footer-info a {
  color: white;
  text-decoration: none;
}

.footer-info a:visited {
  color: white;
}

.footer-info a:hover {
  color: white;
}

.footer-info a:active {
  color: white;
}

.footer-contact-btn {
  display: inline-block;
  margin-top: calc(var(--spacing-unit) * 2);
  padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
  background-color: var(--color-accent);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.footer-contact-btn:hover {
  background-color: white;
  color: var(--color-main);
}

.map-container {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.map-container iframe {
  display: block;
}

.footer-bottom {
  background-color: rgba(0, 0, 0, 0.2);
  padding: calc(var(--spacing-unit) * 3) 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.9rem;
  opacity: 0.8;
}

.scroll-to-top {
  position: fixed;
  bottom: calc(var(--spacing-unit) * 4);
  right: calc(var(--spacing-unit) * 4);
  width: 56px;
  height: 56px;
  background-color: var(--color-main);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, bottom 0.3s ease, border-radius 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.scroll-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top.at-footer {
  bottom: calc(var(--spacing-unit) * 2);
  border-radius: 8px 8px 0 0;
  box-shadow: none;
}

.main-visual {
  position: relative;
  width: 100%;
  height: 950px;
  overflow: hidden;
}

.visual-content {
  position: relative;
  width: 100%;
  height: 100%;
}

.visual-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  width: 90%;
}

.visual-text h1 {
  font-size: 3rem;
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: calc(var(--spacing-unit) * 2);
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.3s forwards;
}

.visual-subtext {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: calc(var(--spacing-unit) * 3);
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.5s forwards;
}

.visual-logo {
  height: 150px;
  width: auto;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.8s forwards;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: calc(var(--spacing-unit) * 2);
  background-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
}

.latest-news {
  padding: calc(var(--spacing-unit) * 8) 0;
  background-color: white;
}

.latest-news h2 {
  color: var(--color-main);
  font-size: 2rem;
  margin-bottom: calc(var(--spacing-unit) * 4);
  padding-bottom: calc(var(--spacing-unit) * 2);
  border-bottom: 3px solid var(--color-accent);
}

.news-list {
  list-style: none;
}

.news-item {
  padding: calc(var(--spacing-unit) * 3) 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 2);
  transition: background-color 0.3s ease;
}

.news-item:hover {
  background-color: var(--color-bg);
  padding-left: calc(var(--spacing-unit) * 2);
}

.news-date {
  color: var(--color-text-light);
  font-weight: 500;
  font-size: 0.95rem;
}

.news-content p {
  line-height: 1.8;
  color: var(--color-text);
}

.greeting {
  padding: calc(var(--spacing-unit) * 8) 0;
  background-color: var(--color-bg);
}

.greeting h2,
.philosophy h2 {
  color: var(--color-main);
  font-size: 2rem;
  margin-bottom: calc(var(--spacing-unit) * 4);
  padding-bottom: calc(var(--spacing-unit) * 2);
  border-bottom: 3px solid var(--color-accent);
}

.greeting-content p {
  margin-bottom: calc(var(--spacing-unit) * 2);
  line-height: 1.8;
}

.signature {
  text-align: right;
  margin-top: calc(var(--spacing-unit) * 4);
}

.signature img {
  max-width: 200px;
  height: auto;
  display: inline-block;
}

@media (max-width: 768px) {
  .signature img {
    max-width: 150px;
  }
}

.philosophy {
  padding: calc(var(--spacing-unit) * 8) 0;
  background-color: white;
}

.philosophy-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: calc(var(--spacing-unit) * 4);
}

.philosophy-description {
  margin-top: calc(var(--spacing-unit) * 6);
  padding-top: calc(var(--spacing-unit) * 6);
  border-top: 1px solid var(--color-border);
}

.philosophy-description p {
  line-height: 1.8;
}

.philosophy-item {
  position: relative;
  padding: calc(var(--spacing-unit) * 5);
  padding-left: calc(var(--spacing-unit) * 6);
  border-radius: 16px;
  text-align: left;
  transition: all 0.3s ease;
  background: white;
  overflow: hidden;
  border-left: 5px solid currentColor;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.philosophy-item::before {
  content: '';
  position: absolute;
  top: calc(var(--spacing-unit) * 2);
  right: calc(var(--spacing-unit) * 2);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.1;
  transition: all 0.3s ease;
}

.philosophy-item::after {
  content: '';
  position: absolute;
  top: calc(var(--spacing-unit) * 3);
  right: calc(var(--spacing-unit) * 3);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.15;
  transition: all 0.3s ease;
}

.philosophy-item:nth-child(1) {
  color: var(--color-quality);
}

.philosophy-item:nth-child(2) {
  color: var(--color-quick);
}

.philosophy-item:nth-child(3) {
  color: var(--color-quest);
}

.philosophy-item:hover {
  transform: translateX(8px);
  border-left-width: 8px;
}

.philosophy-item:hover::before {
  width: 80px;
  height: 80px;
  opacity: 0.15;
}

.philosophy-item h3 {
  position: relative;
  color: var(--color-main);
  margin-bottom: calc(var(--spacing-unit) * 3);
  font-size: 1.6rem;
  font-weight: 700;
  z-index: 1;
}

.philosophy-item p {
  position: relative;
  z-index: 1;
  color: var(--color-text);
  line-height: 1.8;
}

.page-header {
  background-image: linear-gradient(rgba(28, 60, 103, 0.7), rgba(28, 60, 103, 0.7)), url('/src/images/sub_visual.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  padding: calc(var(--spacing-unit) * 10) 0;
  margin-bottom: calc(var(--spacing-unit) * 6);
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-quest));
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.05em;
}

.service-description,
.case-studies,
.company-profile,
.group-companies,
.contact-form-section,
.contact-confirm-section,
.contact-complete-section {
  padding: calc(var(--spacing-unit) * 6) 0;
}

.service-description h2,
.company-profile h2,
.group-companies h2 {
  color: var(--color-main);
  font-size: 2rem;
  margin-bottom: calc(var(--spacing-unit) * 4);
  padding-bottom: calc(var(--spacing-unit) * 2);
  border-bottom: 3px solid var(--color-accent);
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 6);
  margin-top: calc(var(--spacing-unit) * 4);
}

.service-item {
  background-color: white;
  padding: calc(var(--spacing-unit) * 5);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.service-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.service-number {
  position: absolute;
  top: calc(var(--spacing-unit) * 3);
  right: calc(var(--spacing-unit) * 4);
  font-size: 3rem;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.05);
  line-height: 1;
}

.service-item h3 {
  color: var(--color-accent);
  margin-bottom: calc(var(--spacing-unit) * 3);
  font-size: 1.5rem;
  position: relative;
}

.service-item p {
  line-height: 1.8;
  color: var(--color-text);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: calc(var(--spacing-unit) * 4);
}

.case-item {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.case-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.case-info {
  padding: calc(var(--spacing-unit) * 3);
}

.case-info h3 {
  color: var(--color-main);
  margin-bottom: calc(var(--spacing-unit) * 2);
  font-size: 1.3rem;
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  margin-top: calc(var(--spacing-unit) * 4);
}

.profile-table th,
.profile-table td {
  padding: calc(var(--spacing-unit) * 2);
  border: 1px solid var(--color-border);
  text-align: left;
}

.profile-table th {
  background-color: var(--color-main);
  color: white;
  font-weight: 600;
  width: 200px;
}

.group-list {
  list-style: none;
  margin-top: calc(var(--spacing-unit) * 4);
  background-color: white;
  padding: calc(var(--spacing-unit) * 4);
  border-radius: 8px;
}

.group-list li {
  padding: calc(var(--spacing-unit) * 2);
  border-bottom: 1px solid var(--color-border);
}

.zerq-group {
  margin-top: calc(var(--spacing-unit) * 4);
}

.affiliated-company {
  display: flex;
  gap: calc(var(--spacing-unit) * 4);
  background-color: white;
  padding: calc(var(--spacing-unit) * 4);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  align-items: center;
}

.affiliated-logo {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.affiliated-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.affiliated-info h3 {
  color: var(--color-accent);
  margin-bottom: calc(var(--spacing-unit) * 2);
  font-size: 1.3rem;
}

.affiliated-info p {
  line-height: 1.8;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--color-text);
}

.affiliated-link {
  display: inline-block;
  padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
  background-color: var(--color-accent);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.affiliated-link:hover {
  background-color: var(--color-main);
}

.group-list li:last-child {
  border-bottom: none;
}

.contact-form {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  padding: calc(var(--spacing-unit) * 6);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.form-group label {
  display: block;
  margin-bottom: calc(var(--spacing-unit) * 1);
  font-weight: 600;
  color: var(--color-main);
}

.required {
  color: var(--color-accent);
  font-size: 0.85rem;
  margin-left: calc(var(--spacing-unit) * 1);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: calc(var(--spacing-unit) * 1.5);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-main);
}

.form-actions {
  text-align: center;
  margin-top: calc(var(--spacing-unit) * 4);
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  justify-content: center;
}

.btn {
  padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 6);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background-color: var(--color-main);
  color: white;
}

.btn-primary:hover {
  background-color: #15304f;
}

.btn-secondary {
  background-color: var(--color-text-light);
  color: white;
}

.btn-secondary:hover {
  background-color: #555555;
}

.confirm-text {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.confirm-content {
  max-width: 800px;
  margin: 0 auto calc(var(--spacing-unit) * 4);
  background-color: white;
  padding: calc(var(--spacing-unit) * 6);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.confirm-table {
  width: 100%;
  border-collapse: collapse;
}

.confirm-table th,
.confirm-table td {
  padding: calc(var(--spacing-unit) * 2);
  border: 1px solid var(--color-border);
  text-align: left;
}

.confirm-table th {
  background-color: var(--color-bg);
  font-weight: 600;
  width: 200px;
  color: var(--color-main);
}

.complete-message {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  padding: calc(var(--spacing-unit) * 8);
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.complete-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-main);
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.complete-message p {
  margin-bottom: calc(var(--spacing-unit) * 2);
  line-height: 1.8;
}

@media (max-width: 767px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    max-height: 400px;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 0;
    padding: calc(var(--spacing-unit) * 2) 0;
  }

  .nav-menu a {
    display: block;
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
  }

  .logo-image {
    height: 40px;
  }

  .page-header {
    padding: calc(var(--spacing-unit) * 6) 0;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .visual-text h1 {
    font-size: 1.5rem;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
  }

  .visual-subtext {
    font-size: 1rem;
    margin-bottom: calc(var(--spacing-unit) * 2);
  }

  .visual-logo {
    height: 80px;
  }

  .main-visual {
    height: 300px;
  }

  .philosophy-items {
    grid-template-columns: 1fr;
  }

  .service-list,
  .case-grid {
    grid-template-columns: 1fr;
  }

  .profile-table th {
    width: 120px;
    font-size: 0.9rem;
  }

  .profile-table th,
  .profile-table td {
    padding: calc(var(--spacing-unit) * 1.5);
  }

  .contact-form {
    padding: calc(var(--spacing-unit) * 3);
  }

  .confirm-table th {
    width: 120px;
    font-size: 0.9rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit) * 4);
  }

  .footer-about {
    text-align: center;
  }

  .footer-logo-wrap {
    margin-left: auto;
    margin-right: auto;
  }

  .affiliated-company {
    flex-direction: column;
  }

  .affiliated-logo {
    margin: 0 auto;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .visual-text h1 {
    font-size: 2.5rem;
  }

  .visual-subtext {
    font-size: 1.3rem;
  }

  .visual-logo {
    height: 120px;
  }

  .main-visual {
    height: 400px;
  }

  .philosophy-items {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}