/* common.css */
:root {
  --color-white: #fff;
  --color-navy: #1a2e44;
  --color-gray: #f1f2f4;
  --color-accent: #0097b2;
  --color-sub-accent: #aad9e1;
  --shadow-soft: 0 12px 30px rgba(26, 46, 68, 0.12);
  --radius-card: 16px;
  --container-width: 1160px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.8;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--color-navy);
  background: var(--color-gray);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

video {
  user-select: none;
  -webkit-user-drag: none;
}

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

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 100px;
  scroll-margin-top: 90px;
}

.section__header {
  margin-bottom: 32px;
}

.section__eyebrow {
  color: var(--color-accent);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}

.section__title {
  font-size: 32px;
  margin: 0;
  font-weight: 700;
}

.is-loading {
  overflow: hidden;
}

/* Loading */
.loading {
  position: fixed;
  inset: 0;
  background: var(--color-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading__inner {
  text-align: center;
  color: var(--color-navy);
}

.loading__ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--color-sub-accent);
  border-top-color: var(--color-accent);
  margin: 0 auto 12px;
  animation: spin 1s linear infinite;
}

.loading__text {
  margin: 0;
  font-weight: 500;
}

.loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  transition: height 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(26, 46, 68, 0.1);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 36px;
}

.header-nav {
  display: flex;
  gap: 28px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.header-nav__link {
  position: relative;
  transition: color 0.3s ease;
}

.header-nav__link.is-active {
  color: var(--color-accent);
}

/* Side navigation */
.side-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 900;
}

.side-nav__link {
  writing-mode: vertical-rl;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: rgba(26, 46, 68, 0.85);
  transition: color 0.3s ease;
}

.side-nav__link.is-active {
  color: var(--color-accent);
}

/* Hero */
.hero {
  position: relative;
  min-height: 80vh;
  overflow: hidden;
  padding-top: 72px;
  display: block;
}

.hero__video {
  position: relative;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--color-gray);
}

/* About */
.about {
  background: url("../img/back01.png") center bottom/cover no-repeat;
}

.media-block {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 8px 24px rgba(26, 46, 68, 0.08);
}

.media-block__text {
  margin: 0 40px 40px 40px
}

/* Service */
.service {
  background: url("../img/back02.png") center bottom/cover no-repeat;
}

.service__hero {
  margin-top: 32px;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

/* Project */
.project {
  background: url("../img/back03.png") center bottom/cover no-repeat;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.project-card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.project-card__link {
  display: block;
  height: 100%;
  cursor: pointer;
  transition: transform 0.6s ease;
}

.project-card__link:hover {
  transform: translateY(-4px);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 22px 44px rgba(26, 46, 68, 0.2);
}

.project-card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--color-gray);
  transition: transform 0.6s ease;
}

.project-card:hover .project-card__image {
  transform: scale(1.04);
}

.project-card__body {
  padding: 20px 22px 24px;
}

.project-card__meta {
  margin: 0 0 8px;
  font-size: 14px;
  color: rgba(26, 46, 68, 0.7);
}

.project-card__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}

.project-card__tags {
  margin: 0;
  font-size: 14px;
  color: var(--color-accent);
}

/* Footer */
.footer {
  background: var(--color-navy);
  color: var(--color-white);
  padding: 64px 0;
}

.footer__title {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
}

.footer__text {
  margin: 0;
  font-size: 18px;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Responsive */
@media (max-width: 1024px) {
  .container {
    padding: 0 24px;
  }

  .section {
    padding: 72px 0;
  }

  .hero__title {
    font-size: 36px;
  }

  .project-card__image {
    height: 200px;
  }
}

@media (min-width: 1025px) {
  body {
    font-size: 18px;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 56px 0;
  }

  .header-nav {
    gap: 16px;
    font-size: 14px;
  }

  .side-nav {
    display: none;
  }

  .hero__title {
    font-size: 30px;
  }

  .hero__lead {
    font-size: 14px;
  }

  .about {
    background-image: url("../img/mb/back01_mb.png");
  }

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

  .project-card__image {
    height: 180px;
  }
}

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

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
