/* ==========================================
   基本設定
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* ここの色を変えるだけでサイト全体の差し色が変わります */
  --accent-color: #e8795a;
  --text-color: #2b2b2b;
  --bg-color: #fbfaf8;
}

body {
  font-family: "Manrope", "Zen Kaku Gothic New", sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.7;
}

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

/* ==========================================
   ヘッダー
   ========================================== */
.site-header {
  display: flex;
  align-items: center;
  padding: 24px 32px;
  position: relative;
  z-index: 10;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  font-size: 0.9rem;
}

.site-nav a {
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: #3a6b8f;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 24px;
  color: #777;
  font-size: 0.78rem;
  white-space: nowrap;
}

.language-switch a:hover,
.language-switch a[aria-current="page"] {
  color: #3a6b8f;
}

.nav-toggle,
.nav-toggle-label {
  display: none;
}

/* ==========================================
   ヒーローエリア(左: 大きいイラスト / 右: テキスト)
   ========================================== */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

.hero-visual {
  aspect-ratio: 4 / 5;
  background-color: #e5e2dc;
  border-radius: 12px;
  overflow: hidden;
}

.hero-slideshow {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slideshow img {
  position: absolute;
  top: 0;
  left: 16px;
  width: calc(100% - 32px);
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  animation: heroFade 10s infinite;
}

.hero-slideshow img:nth-child(1) {
  animation-delay: 0s;
}

.hero-slideshow img:nth-child(2) {
  animation-delay: 5s;
}

@keyframes heroFade {
  0% { opacity: 0; }
  10% { opacity: 1; }
  40% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 0; }
}

.hero-text h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.hero-sub {
  color: #5a7d9a;
  font-weight: 400;
  margin-bottom: 24px;
}

.hero-name {
  font-weight: 700;
}

.hero-role {
  margin-left: 0.5em;
  font-weight: 400;
}

.hero-lead {
  font-size: 1rem;
  color: #555;
}

/* スマホなど画面が狭いときは縦積みにする */
@media (max-width: 700px) {
  .site-header {
    padding: 20px 24px;
  }

  .logo {
    font-size: 0.9rem;
  }

  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    margin-left: auto;
    cursor: pointer;
  }

  .nav-toggle-label span {
    display: block;
    width: 22px;
    height: 2px;
    margin-left: auto;
    background-color: var(--text-color);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% - 4px);
    right: 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 170px;
    padding: 8px;
    border: 1px solid #e5e2dc;
    border-radius: 10px;
    background-color: var(--bg-color);
    box-shadow: 0 12px 28px rgba(43, 43, 43, 0.1);
  }

  .site-nav a {
    padding: 10px 12px;
  }

  .language-switch {
    position: absolute;
    top: 25px;
    right: 68px;
    margin-left: 0;
  }

  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  .nav-toggle:checked + .nav-toggle-label span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle:checked + .nav-toggle-label span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked + .nav-toggle-label span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 40px 24px 60px;
  }

  .simple-page {
    min-height: 460px;
    padding: 56px 24px 80px;
  }

  .shop-card {
    padding: 24px;
  }
}

/* ==========================================
   Works セクション
   ========================================== */
.works {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

.works h2 {
  font-size: 1.6rem;
  margin-bottom: 32px;
  text-align: center;
}

.view-all-works {
  display: block;
  width: fit-content;
  margin: -16px auto 32px;
  color: #5a7d9a;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.view-all-works:hover {
  color: #3a6b8f;
}

.works-grid {
  display: grid;
  /* スマホでは1列、画面が広くなると自動で列が増える */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.work-card {
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  opacity: 0.85;
}

.work-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: transparent;
  border-radius: 8px;
  margin-bottom: 12px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.work-thumb-1 {
  background-image: url("images/work1.png");
  background-size: 50%;
}

.work-thumb-2 {
  background-image: url("images/work2.png");
  background-size: 80%;
}

.work-thumb-3 {
  background-image: url("images/work3.png");
  background-size: contain;
  padding: 8%;
}

.work-thumb-4 {
  background-image: url("images/work4.png");
  background-size: cover;
}

.work-thumb-5 {
  background-image: url("images/work5.png");
  background-size: 80%;
}

.work-thumb-6 {
  background-image: url("images/work6.png");
  background-size: contain;
  padding: 8%;
}

.work-thumb-pizza {
  background-image: url("images/work7.png");
  background-size: cover;
}

.work-thumb-magazine {
  background-image: url("images/A3Magazine.pdf.png");
  background-size: cover;
}

.work-thumb-wss {
  background-image: url("images/works8.png");
  background-size: contain;
}

.work-thumb-7 {
  background-image: url("images/library-website.png");
  background-size: cover;
}

.work-thumb-8 {
  background-image: url("images/curious-paw-app.webp");
  background-size: cover;
}

.work-title {
  font-weight: 500;
  font-size: 0.95rem;
}

.work-tag {
  font-size: 0.8rem;
  color: #888;
  margin-top: 2px;
}

/* ==========================================
   Works 詳細ページ
   ========================================== */
.works-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 70px 24px 120px;
}

.works-page-heading {
  margin-bottom: 48px;
}

.works-page-heading h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.3;
  margin-bottom: 16px;
}

.works-page-heading > p:last-child {
  color: #555;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px 32px;
}

.gallery-card {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 12px;
  border-radius: 8px;
  background-color: #f1efeb;
  object-fit: contain;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.gallery-image-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: 12px;
  border-radius: 8px;
  background-color: #f1efeb;
  overflow: hidden;
}

.gallery-card-1 .gallery-image-frame img {
  width: 50%;
  height: 100%;
  aspect-ratio: auto;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: auto;
  background-color: transparent;
  border-radius: 0;
}

.gallery-card-padded .gallery-image-frame {
  padding: 16px;
}

.gallery-card-padded .gallery-image-frame img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  margin: 0;
  background-color: transparent;
  border-radius: 0;
}

.gallery-card-uiux .gallery-image-frame img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  margin: 0;
  object-fit: cover;
  border-radius: 0;
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
  transform: translateY(-4px);
  opacity: 0.82;
}

.gallery-card:focus-visible {
  outline: 2px solid #3a6b8f;
  outline-offset: 6px;
}

.gallery-card:target {
  outline: 2px solid #3a6b8f;
  outline-offset: 6px;
}

.gallery-title,
.gallery-tag {
  display: block;
}

.gallery-title {
  font-weight: 500;
  font-size: 0.95rem;
}

.gallery-tag {
  color: #888;
  font-size: 0.8rem;
  margin-top: 2px;
}

.work-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(900px, calc(100% - 32px));
  max-width: 900px;
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--text-color);
  background-color: var(--bg-color);
  box-shadow: 0 20px 60px rgba(43, 43, 43, 0.22);
}

.work-modal::backdrop {
  background-color: rgba(43, 43, 43, 0.58);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 1;
  border: 0;
  background: none;
  color: #555;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.modal-content {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: center;
  padding: 40px;
}

.modal-image {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
}

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

.modal-images:has(.modal-image-secondary[hidden]) {
  display: block;
}

.modal-image-secondary[hidden] {
  display: none;
}

.modal-image-small {
  width: 50%;
  margin-right: auto;
  margin-left: auto;
}

.modal-image-padded {
  width: calc(100% - 32px);
  margin-right: auto;
  margin-left: auto;
}

.modal-category {
  color: #5a7d9a;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.modal-title {
  font-size: 1.6rem;
  line-height: 1.35;
  margin-bottom: 16px;
}

.modal-meta,
.modal-description {
  color: #666;
  font-size: 0.9rem;
}

.modal-description {
  margin-top: 16px;
}

.modal-preview,
.modal-case-study {
  display: block;
  margin-top: 12px;
}

.modal-preview[hidden],
.modal-case-study[hidden] {
  display: none;
}

.modal-presentation {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #ddd;
}

.modal-presentation[hidden] {
  display: none;
}

.modal-presentation h3 {
  margin: 0;
  font-size: 1rem;
}

.modal-presentation-link {
  display: block;
  margin-top: 8px;
}

.modal-source {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #ddd;
}

.modal-source[hidden] {
  display: none;
}

.modal-source h3 {
  margin: 0;
  font-size: 1rem;
}

.modal-source-link {
  display: block;
  margin-top: 8px;
}

/* ==========================================
   お問い合わせページ
   ========================================== */
.contact {
  max-width: 600px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

.contact h2 {
  font-size: 1.6rem;
  margin-bottom: 16px;
  text-align: center;
}

.contact-lead {
  text-align: center;
  color: #555;
  margin-bottom: 40px;
  font-size: 0.95rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 500;
}

.form-field .required {
  margin-left: 4px;
  color: var(--accent-color);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #5a7d9a;
  box-shadow: 0 0 0 3px rgba(90, 125, 154, 0.15);
}

.contact-form .h-captcha {
  margin-top: 4px;
}

/* hCaptcha ウィジェットは幅 303px 固定なので、極端に狭い画面では縮小する */
@media (max-width: 360px) {
  .contact-form .h-captcha {
    transform: scale(0.85);
    transform-origin: left top;
  }
}

.contact-form .submit-button {
  align-self: center;
  min-width: 200px;
}

.submit-button {
  display: inline-block;
  padding: 14px 32px;
  margin-top: 8px;
  border: none;
  border-radius: 8px;
  background-color: #5a7d9a;
  color: #fff;
  font-family: "Manrope", "Zen Kaku Gothic New", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
}

.submit-button:hover {
  background-color: #3a6b8f;
  opacity: 0.95;
}

.contact-note {
  margin-top: 32px;
  font-size: 0.8rem;
  color: #888;
  text-align: center;
  line-height: 1.6;
}

.contact-note a {
  color: #5a7d9a;
  text-decoration: underline;
}

.contact-note a:hover {
  color: #3a6b8f;
}

/* ==========================================
   About / Shop ページ
   ========================================== */
.simple-page {
  max-width: 760px;
  min-height: 520px;
  margin: 0 auto;
  padding: 80px 24px 120px;
}

.eyebrow {
  color: #5a7d9a;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.simple-page h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.3;
  margin-bottom: 24px;
}

.about-heading .about-name,
.about-heading .about-role {
  display: block;
}

.about-heading .about-name {
  font-weight: 700;
}

.about-heading .about-role {
  margin-top: 4px;
  color: #5a7d9a;
  font-size: 0.38em;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.page-lead {
  color: #555;
  font-size: 1.1rem;
  margin-bottom: 48px;
}

.about-copy {
  max-width: 580px;
  color: #555;
}

.about-copy p + p {
  margin-top: 20px;
}

.text-link {
  display: inline-block;
  color: #5a7d9a;
  margin-top: 40px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: #3a6b8f;
}

.shop-card {
  max-width: 560px;
  padding: 32px;
  border: 1px solid #e5e2dc;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.55);
}

.shop-card p {
  color: #555;
  margin-bottom: 28px;
}

/* ==========================================
   フッター
   ========================================== */
.site-footer {
  text-align: center;
  padding: 48px 24px;
  border-top: 1px solid #e5e2dc;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #3a6b8f;
}

.copyright {
  font-size: 0.8rem;
  color: #999;
}

@media (max-width: 700px) {
  .simple-page {
    min-height: 460px;
    padding: 56px 24px 80px;
  }

  .shop-card {
    padding: 24px;
  }

  .works-page {
    padding: 56px 24px 80px;
  }

  .modal-content {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 40px 24px 28px;
  }

  .modal-image {
    max-height: 52vh;
  }

  .modal-images {
    grid-template-columns: 1fr;
  }
}
