@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;700&family=Playfair+Display:wght@400;700&display=swap');

:root {
  --base-bg: #ffffff;
  --base-text: #222222;
  --accent: #b79b5b;
  --dark-bg: #111111;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--base-text);
  background: var(--base-bg);
  line-height: 1.8;
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
}

header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin: 0;
}
header h1 a{
  color: var(--base-text);
  text-decoration: none;
}

header .logo a {
  color: #000;
  text-decoration: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 4px;
  width: 28px;
  margin: 5px 0;
  background: #222;
  border-radius: 2px;
  transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: #000;
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav a:hover::after {
  width: 100%;
}

.hero {
  position: relative;
  height: 60vh;
  background-image: url('../images/hero-pc.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hero h1,
.hero p {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.8rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.5em;
}

.hero p {
  font-size: 1.2rem;
}

section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
}

section h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 40px;
}

.card {
  background: #ffffff;
  border: 1px solid #eeeeee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin: 10px;
}

.card p span{
  font-weight: bold;
  color: darkcyan;
  font-size: 1.2em;
}

#message .card {
  display: flex;
  align-items: center;
  gap: 20px;
}

#message .card img {
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
}

#message .message-text {
  flex: 1;
}
#message .message-text strong {
  font-size: 1.2em;
}

#works-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.work-card .work-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.work-card .work-images img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #eee;
  cursor: pointer;
  transition: opacity 0.2s;
}

.work-card .work-images img:hover {
  opacity: 0.8;
}

.works-error {
  color: #666;
  text-align: center;
  padding: 20px;
}

#contact form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#contact label {
  display: block;
  text-align: center;
}
#contact input,
#contact textarea {
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  max-width: 800px;
  margin: auto;
  border: solid 1px #999999;
}

#contact button {
  align-self: flex-start;
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  width: 100%;
  max-width: 200px;
  margin: auto;
}
.g-recaptcha{
    margin: auto;
}

#contact-dialog {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
}

#contact-dialog::backdrop {
  background: rgba(0, 0, 0, 0.3);
}


footer {
  background: var(--dark-bg);
  color: #ffffff;
  text-align: center;
  padding: 30px 20px;
  font-size: 0.9rem;
}

/* 画像モーダル */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.image-modal.active {
  display: flex;
}

.image-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  line-height: 1;
  transition: opacity 0.2s;
}

.image-modal-close:hover {
  opacity: 0.7;
}

.image-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
  font-size: 30px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  z-index: 10001;
}

.image-modal-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.image-modal-nav.prev {
  left: 20px;
}

.image-modal-nav.next {
  right: 20px;
}

.image-modal-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 10001;
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #ddd;
    padding: 10px 20px;
  }

  .nav.open {
    display: block;
  }

  .nav ul {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .nav a {
    margin: 10px 0;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    background-image: url('../images/hero-sp.jpg');
  }

  .hero h1 {
    font-size: 2rem;
  }

  #message .card {
    flex-direction: column;
    text-align: center;
  }

  section {
    padding: 60px 15px;
  }
}
