:root {
  --color-primary: #0545B3;
  --color-primary-dark: #01367F;
  --color-heading: #0B0B0B;
  --color-body: #444;
  --color-bg-light: #F9FAFB;
  --color-white: #FFFFFF;
  --color-gray-light: #E5E7EB;
  --color-gray: #9CA3AF;
  --color-success: #10B981;
  --color-error: #EF4444;
  
  --font-sans: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 5%);
  --shadow-md: 0 2px 4px rgb(0 0 0 / 8%);
  --shadow-lg: 0 4px 8px rgb(0 0 0 / 12%);
  
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  
  --container-max: 1200px;
  --container-padding: clamp(1rem, 4vw, 2rem);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-body);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: normal; /* auto→normalに修正 */
  /* line-break: strict; 削除 */
  letter-spacing: normal; /* 0.01em→normalに修正 */
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-primary-dark);
}

.section-title {
  font-size: clamp(2rem, 1.5vw + 1.5rem, 3rem);
  font-weight: 700;
  color: var(--color-heading);
  text-align: center;
  margin-bottom: 3rem;
  line-height: 1.3;
}

.header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
}

.header__nav {
  padding: 1rem 0;
}

.header__nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.header__toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.header__toggle-line {
  width: 24px;
  height: 2px;
  background-color: var(--color-heading);
  transition: transform 0.3s ease;
}

.header__menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.header__link {
  color: var(--color-heading);
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.header__link:hover {
  color: var(--color-primary);
}

.hero {
  padding-top: 8rem;
  padding-bottom: 5rem;
  background: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-white) 100%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero__title {
  font-size: clamp(2.4rem, 1.5vw + 2rem, 4rem);
  font-weight: 700;
  color: #333333;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--color-body);
  margin-bottom: 2rem;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero__cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-weight: 500;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.hero__cta:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--color-white);
}

.hero__image {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  width: 100%;
}

.hero__image img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.hero__canvas {
  display: flex;
  justify-content: center;
  align-items: center;
}

#sphereCanvas {
  display: block;
  cursor: pointer;
  max-width: 100%;
  height: auto;
}

.profile {
  padding: 5rem 0;
  background-color: var(--color-white);
}

.profile__info {
  max-width: 45%;
  margin: 0;
}

.profile__info p {
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.profile__social a {
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.profile__social a:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}

.profile__content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  align-items: start;
}

.profile__image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.profile__name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 0.5rem;
}

.profile__title {
  font-size: 1.125rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.profile__bio {
  color: var(--color-body);
  line-height: 1.8;
  margin-bottom: 2rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.profile__achievements {
  display: flex;
  gap: 3rem;
  margin-top: 2rem;
}

.achievement {
  text-align: center;
}

.achievement__number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.achievement__label {
  display: block;
  font-size: 0.875rem;
  color: var(--color-body);
  margin-top: 0.5rem;
}

.services {
  padding: 5rem 0;
  background-color: var(--color-bg-light);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background-color: var(--color-white);
  padding: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.service-card__image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.service-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.service-card:hover .service-card__image img {
  transform: scale(1.05);
}

.service-card__content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-card__icon {
  width: 64px;
  height: 64px;
  background-color: var(--color-bg-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

.service-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 1rem;
}

.service-card__description {
  color: var(--color-body);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.service-card__features {
  list-style: none;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-card__features li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: var(--color-body);
  font-size: 1rem;
  line-height: 1.6;
}

.service-card__features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.service-card__price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

.service-card__button {
  display: inline-block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  margin-top: auto;
}

.service-card__button:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--color-white);
}

.contact {
  padding: 5rem 0;
  background-color: var(--color-white);
}

.contact__description {
  text-align: center;
  color: var(--color-body);
  margin-bottom: 3rem;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: keep-all;
}

.contact__form {
  max-width: 600px;
  margin: 0 auto;
  padding-inline: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  color: var(--color-heading);
  margin-bottom: 0.5rem;
  font-size: 1rem;
  line-height: 1.8;
}

.required {
  color: var(--color-error);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-body);
  background-color: var(--color-white);
  transition: border-color 0.3s ease;
  word-break: keep-all;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-textarea {
  resize: vertical;
  min-height: 150px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #cccccc;
  opacity: 1;
}

.form-submit {
  width: 100%;
  padding: 1rem 2rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-weight: 500;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.form-submit:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.footer {
  padding: 3rem 0;
  background-color: #333333;
  color: var(--color-white);
}

.footer__nav {
  margin-bottom: 2rem;
}

.footer__menu {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 2rem;
}

.footer__link {
  color: var(--color-white);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer__link:hover {
  color: var(--color-white);
  opacity: 1;
}

.footer__copy {
  text-align: center;
  opacity: 0.6;
  font-size: 0.875rem;
}

/* SNSアイコンのホバー効果とスタイル */
.footer__social a {
  display: inline-block;
  padding: 8px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.footer__social a:hover {
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

p, li, span {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Professional Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation utility classes */
.animate-fadeInUp {
  animation: fadeInUp 0.8s ease-out;
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

.animate-slideInLeft {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slideInRight {
  animation: slideInRight 0.6s ease-out;
}

.animate-scaleIn {
  animation: scaleIn 0.6s ease-out;
}

/* Scroll animation states */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Stagger animation for list items */
.stagger-list li {
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-list.active li {
  opacity: 1;
  transform: translateX(0);
}

.stagger-list.active li:nth-child(1) { transition-delay: 0.1s; }
.stagger-list.active li:nth-child(2) { transition-delay: 0.2s; }
.stagger-list.active li:nth-child(3) { transition-delay: 0.3s; }
.stagger-list.active li:nth-child(4) { transition-delay: 0.4s; }
.stagger-list.active li:nth-child(5) { transition-delay: 0.5s; }

/* Parallax effect */
.parallax-container {
  position: relative;
  overflow: hidden;
}

.parallax-element {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Service card enhancements */
.service-detail-card {
  background-color: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.service-detail-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(5, 69, 179, 0.05), transparent);
  transform: rotate(45deg) translateY(100%);
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-detail-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.service-detail-card:hover::before {
  transform: rotate(45deg) translateY(-100%);
}

@media (max-width: 450px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding-inline: 1rem;
  }
  
  .header__nav {
    padding: 0.75rem 0;
  }
  
  .header__logo {
    font-size: 1.25rem;
  }
  
  .header__toggle {
    display: flex;
  }
  
  .header__menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    gap: 1rem;
  }
  
  .header__menu.active {
    transform: translateX(0);
  }
  
  .hero {
    padding-top: 5rem;
    padding-bottom: 3rem;
  }
  
  .hero .container {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 2rem;
  }
  
  .hero__title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .hero__subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.9;
    letter-spacing: 0.02em;
  }
  
  .hero__cta {
    padding: 0.875rem 2rem;
    font-size: 0.875rem;
  }
  
  .hero__image {
    display: none;
  }
  
  .hero__canvas {
    margin-top: 2rem;
  }
  
  #sphereCanvas {
    width: 280px !important;
    height: 280px !important;
  }
  
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    padding-inline: 1rem;
  }
  
  .profile {
    padding: 3rem 0;
  }
  
  .profile__content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .profile__image {
    max-width: 180px;
    margin: 0 auto;
  }
  
  .profile__name {
    font-size: 1.5rem;
  }
  
  .profile__title {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .profile__bio {
    font-size: 0.95rem; /* 少し大きく */
    margin-bottom: 1.5rem;
    line-height: 1.7; /* 1.9→1.7に調整 */
    letter-spacing: normal; /* 0.02em→normalに修正 */
  }
  
  .profile__achievements {
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
  }
  
  .achievement__number {
    font-size: 2rem;
  }
  
  .achievement__label {
    font-size: 0.75rem;
  }
  
  .services {
    padding: 3rem 0;
  }
  
  .services__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
  }
  
  .service-card__content {
    padding: 1.5rem;
  }
  
  .service-card__title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }
  
  .service-card__description {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.8;
    letter-spacing: 0.01em;
  }
  
  .service-card__features li {
    font-size: 0.813rem;
    margin-bottom: 0.375rem;
  }
  
  .service-card__price {
    font-size: 1.125rem;
  }
  
  .contact {
    padding: 2.5rem 0;
  }
  
  .contact__description {
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    letter-spacing: normal;
    word-break: keep-all;
    text-align: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }
  
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-label {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.8;
  }
  
  .form-input,
  .form-textarea {
    padding: 1rem 1.2rem;
    font-size: 1rem;
    line-height: 1.8;
    min-height: 48px;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
  }
  
  .form-submit {
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
    min-height: 48px;
    touch-action: manipulation;
    width: 100%;
    border-radius: var(--radius-md);
  }
  
  .footer {
    padding: 2rem 0;
  }
  
  .footer__menu {
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
  
  .footer__copy {
    font-size: 0.75rem;
  }
}

.mobile-only {
  display: none;
}

@media (max-width: 1024px) {
  .profile__info {
    max-width: 80%;
  }
}

@media (max-width: 768px) {
  .mobile-only {
    display: inline;
  }
  
  .profile__info {
    max-width: 100%;
    padding: 0 1rem;
  }
}