@charset "utf-8";

/* ============================================================
   CSS カスタムプロパティ（デザイントークン）
   ============================================================ */
:root {
  /* Colors */
  --color-bg:         #ffffff;
  --color-bg-light:   #f4f6f9;
  --color-bg-blue:    #BAD9F1;
  --color-primary:    #0A2248;
  --color-accent:     #0147b9;

  /* Z-index */
  --z-header:         9999;
  --z-modal:          99999;
  --z-opening:        9999999;

  /* Transition */
  --transition-base:  0.3s ease;
  --transition-fade:  0.4s ease;

  /* Spacing */
  --space-xs:  clamp(0.5rem,  1vw,  0.75rem);
  --space-sm:  clamp(0.75rem, 1.5vw, 1rem);
  --space-md:  clamp(1rem,    2vw,  1.5rem);
  --space-lg:  clamp(2rem,    4vw,  3rem);
  --space-xl:  clamp(3rem,    6vw,  5rem);
}

/* ============================================================
   スキップリンク
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--border-radius-md, 8px) var(--border-radius-md, 8px);
  font-size: 0.875rem;
  z-index: calc(var(--z-opening) + 1);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  opacity: 1;
}

/* ============================================================
   Reset
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: none;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 50px;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--color-primary);
  line-height: 1.6;
}

a {
  display: inline-block;
  text-decoration: none;
  transition: opacity var(--transition-fade);
}

a:hover {
  opacity: 0.7;
}

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

/* ============================================================
   共通
   ============================================================ */

.main{
  margin-top: 80px;
}

.inner {
  max-width: 1000px;
  padding-inline: 20px;
  margin-inline: auto;
}

.section-title {
  font-size: 50px;
  text-align: center;
  text-transform: capitalize;
  line-height: 1.3;
  margin-bottom: 12px;
}

.section-desc {
  text-align: center;
}

.section-bg {
  background-color: var(--color-bg-light);
}

/* ============================================================
   オープニング
   ============================================================ */
.opening {
  position: fixed;
  inset: 0;
  z-index: var(--z-opening);
  background: linear-gradient(#020b1f, #0147b9);
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
}

.opening::before,
.opening::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.7;
}

.opening::before {
  background-image:
    radial-gradient(5px 5px at 20% 30%, white, transparent),
    radial-gradient(3px 3px at 80% 40%, white, transparent),
    radial-gradient(3px 3px at 50% 70%, white, transparent),
    radial-gradient(5px 5px at 10% 80%, white, transparent),
    radial-gradient(3px 3px at 90% 20%, white, transparent),
    radial-gradient(3px 3px at 10% 10%, white, transparent),
    radial-gradient(5px 5px at 30% 40%, white, transparent),
    radial-gradient(2px 2px at 60% 20%, white, transparent),
    radial-gradient(3px 3px at 80% 70%, white, transparent),
    radial-gradient(2px 2px at 90% 50%, white, transparent),
    radial-gradient(3px 3px at 30% 40%, white, transparent),
    radial-gradient(5px 5px at 60% 20%, white, transparent),
    radial-gradient(3px 3px at 80% 70%, white, transparent),
    radial-gradient(2px 2px at 90% 50%, white, transparent);
  animation: twinkle 2s ease-in-out infinite;
}

.opening::after {
  background-image:
    radial-gradient(5px 5px at 10% 40%, white, transparent),
    radial-gradient(3px 3px at 80% 60%, white, transparent),
    radial-gradient(5px 5px at 90% 90%, white, transparent),
    radial-gradient(3px 3px at 20% 30%, white, transparent),
    radial-gradient(3px 3px at 50% 20%, white, transparent),
    radial-gradient(5px 5px at 50% 50%, white, transparent),
    radial-gradient(2px 2px at 70% 30%, white, transparent),
    radial-gradient(3px 3px at 20% 80%, white, transparent),
    radial-gradient(2px 2px at 20% 60%, white, transparent),
    radial-gradient(3px 3px at 80% 20%, white, transparent),
    radial-gradient(3px 3px at 40% 50%, white, transparent),
    radial-gradient(5px 5px at 70% 30%, white, transparent),
    radial-gradient(3px 3px at 80% 80%, white, transparent),
    radial-gradient(2px 2px at 95% 60%, white, transparent);
  animation: twinkle 1s ease-in-out infinite;
}

@keyframes twinkle {
  0%,100% { opacity: 0.2; }
  50%      { opacity: 1; }
}

.opening-txt {
  font-size: 35px;
  text-align: center;
  color: #fff;
}

.opening-desc {
  font-size: 16px;
}

.js-opening-txt {
  opacity: 0;
  transform: translateY(60px);
}

/* ============================================================
   ヘッダー
   ============================================================ */
.header {
  width: 100%;
  height: 80px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-header);
  background: transparent;
  transition: background-color var(--transition-fade), box-shadow var(--transition-fade);
}

.header.is-scrolled {
  background-color: rgba(186, 217, 241, 0.75);
  box-shadow: 0 2px 4px rgba(1, 71, 185, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

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

.header__logo {
  margin: 0;
  height: inherit;
}

.header__link {
  display: flex;
  height: inherit;
  color: var(--color-accent);
  gap: 12px;
  align-items: center;
}

.header__title {
  line-height: 1;
  white-space: nowrap;
  font-size: 26px;
}

.header-nav {
  height: inherit;
  margin-left: auto;
}

.header-nav__lists {
  display: flex;
  column-gap: 30px;
  height: inherit;
}

.header-nav__list {
  height: inherit;
  list-style: none;
}

.header-nav__link {
  font-size: 26px;
  color: var(--color-accent);
  height: inherit;
  display: flex;
  align-items: center;
  text-transform: capitalize;
}

/* ============================================================
   FV
   ============================================================ */
.fv {
  display: grid;
  height: 85vh;
  background: var(--color-bg-blue);
  place-items: center;
  overflow: hidden;
}
@media screen and (max-width: 767px) {
  .fv{
    height: 60vh;
  }
}

.fv__img {
  width: min(960px, 70%);
  margin: 0 auto;
}
@media screen and (max-width: 767px) {
  .fv__img{
    width: 100%;
  }
}

.fv__img img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* ============================================================
   About
   ============================================================ */
.about {
  padding-block: var(--space-xl);
}

.about__content {
  display: flex;
  justify-content: center;
  column-gap: calc(80 / 960 * 100%);
  margin-top: 24px;
}

.about__text {
  flex: 1;
}

.about__lists {
  margin-top: 30px;
  padding-left: 1em;
}

.about__image {
  width: clamp(120px, 40vw, 240px);
}

/* ============================================================
   Service
   ============================================================ */
.service {
  padding-block: var(--space-xl);
}

.service__items {
  max-width: 790px;
  margin-inline: auto;
  margin-top: 35px;
  font-size: 15px;
  text-align: center;
  display: flex;
  column-gap: calc(80 / 790 * 100%);
}

.service-item {
  width: calc(210 / 790 * 100%);
}

.service-item__text {
  padding-top: 22px;
}

.service-item__image {
  margin-inline: auto;
}

.service-item__image img {
  width: clamp(84px, 22vw, 120px);
  height: auto;
  display: block;
  margin: 0 auto 16px;
  opacity: 0.7;
  transition: opacity var(--transition-base);
}

.service__item:hover .service-item__image img {
  opacity: 1;
}

.service-item__title {
  margin: 8px 0 12px;
  text-align: center;
  font-size: 18px;
}

/* ============================================================
   Works
   ============================================================ */
.works {
  padding-block: var(--space-xl);
}

.works__items {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  align-items: stretch;
}

.works-item {
  flex: 1;
  min-width: 0;
  background-color: var(--color-bg);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.works-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}

.works-item__image {
  aspect-ratio: 1 / 1;
  background-color: var(--color-primary);
  display: flex;
  border-radius: 16px;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.works-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.works-item__text {
  padding: 14px 8px 18px;
  text-align: center;
  background: var(--color-bg);
  margin: auto;
}

.works-item__desc {
  margin: 0;
}

.view-link {
  font-size: 14px;
  margin-top: 8px;
  display: inline-block;
  transition: transform var(--transition-base);
}

.works-item:hover .view-link {
  transform: translateX(4px);
}

/* ============================================================
   Contact
   ============================================================ */
.contact {
  padding-block: var(--space-xl);
  width: 100%;
}

.form-wrap {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.form-wrap iframe {
  width: 100%;
  height: 900px;
  border: 0;
  border-radius: 16px;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  height: 150px;
  background: var(--color-bg-blue);
  padding: 18px 0 14px;
  text-align: center;
}

.footer__inner {
  display: flex;
  flex-direction: column;
}

.footer-nav__lists {
  display: flex;
  justify-content: center;
  column-gap: 28px;
  flex-wrap: wrap;
  list-style: none;
}

.footer-nav__lists::after {
  content: '';
  display: block;
  width: min(520px, 90%);
  height: 1px;
  background: var(--color-primary);
  margin: 10px auto 0;
  opacity: 0.5;
}

.footer-nav__list {
  list-style: none;
}

.footer-nav__link {
  color: var(--color-primary);
  font-size: 26px;
  text-transform: capitalize;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 0 0;
}

.footer__copyright {
  color: var(--color-primary);
  font-size: 14px;
  margin-top: 8px;
  opacity: 0.8;
}

/* ============================================================
   SNS
   ============================================================ */
.sns {
  display: flex;
  align-items: center;
  column-gap: 12px;
}

.sns__list {
  list-style: none;
  line-height: 0;
}

.sns__link {
  width: 24px;
  display: inline-block;
  transition: transform 0.25s, opacity 0.25s;
}

.sns__link:hover {
  transform: translateY(-3px);
  opacity: 0.7;
}

.sns__link--x {
  width: 20px;
}

/* ============================================================
   モーダル
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
}

.modal.is-open {
  display: block;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal__content {
  position: absolute;
  inset: 24px;
  margin: auto;
  max-width: 980px;
  max-height: 90vh;
  background: var(--color-bg);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  padding: 18px;
}

.modal__figure {
  margin: 0;
  text-align: center;
}

.modal__figure img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.modal__caption {
  margin-top: 10px;
  font-size: 16px;
  color: #022953;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 22px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
}

.modal__nav {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
}

/* ============================================================
   レスポンシブ（タブレット以下）
   ============================================================ */
@media screen and (max-width: 767px) {
  body { font-size: 16px; }

  .section-title { font-size: 40px; }

  .header-nav { display: none; }

  .header__link { font-size: 30px; }

  .about__content {
    margin-top: 8px;
    display: block;
  }

  .about__image { margin: 16px auto; }

  .service { padding-block: 72px; }

  .service__items { display: block; }

  .service-item {
    width: 100%;
    margin-top: 64px;
  }

  .service-item__title {
    font-size: 16px;
    margin: 6px 0 10px;
  }

  .works__items {
    display: block;
    margin-top: 28px;
  }

  .works-item { margin-bottom: 48px; }

  .works-item:not(:first-of-type) { margin-top: 36px; }

  .works-item__image {
    max-width: 100%;
    margin: 0 auto;
    padding: 28px;
  }

  .contact { padding-bottom: var(--space-xl, 4rem); }

  .footer { padding-block: 30px 40px; }

  .footer-nav__lists { padding-inline: 60px; }

  .footer-nav__link { font-size: 18px; }

  .footer__copyright { margin-top: 5px; }

  .modal__content {
    inset: 12px;
    grid-template-columns: 44px 1fr 44px;
    padding: 12px;
  }
}

@media screen and (max-width: 374px) {
  .footer__copyright { line-height: 1; }
  .ib { display: inline-block; }
}

/* ============================================================
   ハンバーガーメニュー
   ============================================================ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  background: none;
  padding: 0.25rem;
  z-index: calc(var(--z-header) + 1);
  flex-shrink: 0;
}

.hamburger__line {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  transition: transform 0.35s ease, opacity 0.35s ease;
  transform-origin: center;
}

.hamburger.is-open .hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open .hamburger__line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.is-open .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.sp-nav {
  display: none;
  position: fixed;
  top: clamp(3rem, 6vw, 5rem);
  left: 0;
  width: 100%;
  background: rgba(186, 217, 241, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: calc(var(--z-header) - 1);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
}

.sp-nav.is-open {
  max-height: 20rem;
}

.sp-nav__lists {
  list-style: none;
  padding: var(--space-sm, 0.75rem) 0 var(--space-md, 1.25rem);
  border-top: 1px solid rgba(1, 71, 185, 0.15);
}

.sp-nav__list {
  text-align: center;
}

.sp-nav__link {
  display: block;
  padding: 0.75rem 1.5rem;
  font-size: 1.25rem;
  color: var(--color-accent);
  text-transform: capitalize;
  letter-spacing: 0.1em;
  transition: background 0.3s ease, opacity 0.3s ease;
}

.sp-nav__link:hover {
  background: rgba(1, 71, 185, 0.08);
  opacity: 1;
}

@media screen and (max-width: 767px) {
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .sp-nav { display: block; }
}

/* ============================================================
   カスタムカーソル
   ============================================================ */
@media (pointer: fine) {
  * { cursor: none !important; }

  .cursor {
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: calc(var(--z-opening) + 10);
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, background 0.3s ease, width 0.3s ease, height 0.3s ease;
  }

  .cursor.is-hover {
    width: 36px;
    height: 36px;
    background: rgba(1, 71, 185, 0.15);
    border: 1.5px solid var(--color-accent);
  }

  .cursor-follower {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(1, 71, 185, 0.4);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: calc(var(--z-opening) + 9);
    transform: translate(-50%, -50%);
    transition: transform 0.12s ease;
  }

  .cursor-follower::before {
    content: "✦";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: var(--color-accent);
    opacity: 0.6;
  }
}

/* ============================================================
   FV Canvas・波形
   ============================================================ */
.fv {
  position: relative;
}

.fv-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.fv__img {
  position: relative;
  z-index: 1;
}

.fv-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  z-index: 2;
  line-height: 0;
}

.fv-wave svg {
  width: 100%;
  height: clamp(2.5rem, 5vw, 5rem);
  display: block;
}

/* ============================================================
   Works（Web制作実績）
   ============================================================ */
.works__items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: clamp(1rem, 3vw, 1.75rem);
  margin-top: var(--space-lg);
}

.works-item--web {
  background: var(--color-bg);
  border-radius: 1rem;
  overflow: hidden;
  border: 0.5px solid rgba(1, 71, 185, 0.12);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
}

.works-item--web:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(1, 71, 185, 0.12);
}

.works-item__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.works-item__thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #BAD9F1 0%, #90bfe8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.works-item__thumb-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-style: italic;
  color: #0A2248;
  opacity: 0.5;
  letter-spacing: 0.05em;
}

.works-item__body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.works-item__category {
  font-size: var(--text-sm);
  color: var(--color-accent);
  letter-spacing: 0.08em;
}

.works-item__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-primary);
  line-height: 1.3;
}

.works-item__text {
  font-size: var(--text-sm);
  color: #4a6080;
  line-height: 1.75;
  flex: 1;
}

.works-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin-top: var(--space-xs);
}

.works-item__tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e8f2fc;
  color: var(--color-accent);
  letter-spacing: 0.04em;
}

.works-item__thumb-link {
  display: block;
  width: 100%;
  height: 100%;
}

.works-item__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.4s ease;
}

.works-item--web:hover .works-item__thumb-img {
  transform: scale(1.03);
}

.works-item__thumb-placeholder--cesio {
  background: linear-gradient(135deg, #1a3a6e 0%, #2a5298 100%);
}

.works-item__thumb-placeholder--cesio .works-item__thumb-label {
  color: #c8dff5;
  font-size: clamp(2rem, 5vw, 3.5rem);
  opacity: 0.9;
  letter-spacing: 0.1em;
}

.works-item__link {
  display: inline-block;
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-accent);
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(1, 71, 185, 0.3);
  padding-bottom: 2px;
  transition: border-color var(--transition-base), opacity var(--transition-base);
}

.works-item__link:hover {
  border-color: var(--color-accent);
  opacity: 0.8;
}

/* ============================================================
   Gallery（旧Works）
   ============================================================ */
.gallery {
  padding-block: var(--space-xl);
}

.gallery__items {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: var(--space-lg);
  align-items: stretch;
}

.gallery-item {
  flex: 1;
  min-width: 0;
  background-color: var(--color-bg);
  border-radius: 1.125rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.gallery-item__image {
  aspect-ratio: 1 / 1;
  background-color: var(--color-primary);
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  flex: 0 0 auto;
}

.gallery-item__image > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.4s ease;
  position: relative;
  z-index: 1;
}

/* ホバーでちら見せ画像 */
.gallery-item__preview {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.gallery-item__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item:hover .gallery-item__preview {
  opacity: 1;
  transform: translateX(0);
}

.gallery-item__text {
  padding: var(--space-sm) var(--space-xs) var(--space-md);
  text-align: center;
  background: var(--color-bg);
  margin: auto;
}

.gallery-item__desc {
  margin: 0;
  font-size: var(--text-base);
}

/* ============================================================
   欧文フォントはWorksタイトルのみ
   ============================================================ */

/* ============================================================
   レスポンシブ追記
   ============================================================ */
@media screen and (max-width: 767px) {
  .gallery__items { display: block; }
  .gallery-item { margin-bottom: var(--space-lg); }
  .gallery-item__image { padding: 1.5rem; }
  .cursor, .cursor-follower { display: none; }
}
