@charset "UTF-8";

/* --- Design System Variables --- */
:root {
  /* Colors */
  --primary-color: #0E8AAA;
  --text-color: #3A3A3A;
  --text-dark: #333;
  --text-muted: #666;
  --text-light: #aaa;
  --bg-white: #fff;
  --bg-light: #FAFAFA;
  --error-color: #E4004F;
  --accent-blue: #0085D0;
  --accent-yellow: #FFD800;
  --border-color: #ddd;
  --border-light: #EAEAEA;
  --placeholder-color: #E0E0E0;
  --scrollbar-track: #f1f1f1;

  /* Fonts */
  --font-main: "Noto Sans JP", sans-serif;
  --font-accent: "Josefin Sans";
  --font-roboto: "Roboto";

  /* Transitions */
  --transition-speed: 0.3s;
}

/* --- Base Styles --- */
body {
  background: var(--bg-white);
  color: var(--text-color);
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.main-wrapper {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

h1 img {
  width: 540px;
  max-width: 90%;
  margin: 0 0 40px 0;
}

section {
  width: 100%;
  text-align: center;
  margin: 0 0 50px 0;
}

h2 {
  font-family: var(--font-accent);
  font-size: 120%;
  text-align: center;
  letter-spacing: 0rem;
  margin: 0 0 30px 0;
  animation: AnimationTitle 60s ease infinite;
  background: linear-gradient(to right, var(--accent-blue), var(--accent-yellow), var(--error-color));
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

@keyframes AnimationTitle {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

p {
  font-family: var(--font-main);
  font-size: 78.5%;
  text-align: center;
  letter-spacing: 0.05rem;
  line-height: 1.75rem;
}

small {
  font-family: var(--font-roboto);
  font-size: 60%;
  position: absolute;
  bottom: 20px;
  left: 50%;
  display: block;
  text-align: center;
  transform: translate(-50%, 0);
  width: 100%;
}

/* --- Buttons --- */
.btn-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  width: 100%;
}

.open-btn {
  color: var(--primary-color);
  background: var(--bg-white);
  border: 1px solid var(--primary-color);
  font-size: 75%;
  cursor: pointer;
  padding: 3px 10px 5px 10px;
  text-decoration: none;
  line-height: 1.2;
  box-sizing: border-box;
}

#openModal {
  padding: 4px 10px 4px 10px;
}

.open-btn:hover {
  opacity: 0.6;
}

/* --- Modal Overlay --- */
.modal-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-speed), visibility var(--transition-speed);
  z-index: 1000;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal-overlay::-webkit-scrollbar {
  display: none;
}

/* --- Modal Content --- */
.modal-content {
  background: var(--bg-white);
  width: 90%;
  height: auto;
  margin: 40px auto;
  max-width: 500px;
  padding: 40px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px);
  transition: transform var(--transition-speed);
  box-sizing: border-box;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
  z-index: 100;
}

.close-btn:hover {
  color: var(--text-dark);
}

/* --- Contact Form --- */
.contact-form {
  width: 100%;
  box-sizing: border-box;
}

.contact-form h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 22px;
  text-align: center;
  color: var(--text-dark);
}

.contact-form p {
  font-size: 14px;
  line-height: 1.5rem;
  margin: 0 0 30px 0;
}

.form-group {
  margin-bottom: 15px;
  width: 100%;
  height: auto;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 14px;
  color: #555;
}

.form-group input,
.form-group textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  box-sizing: border-box;
  font-size: 16px;
  height: 40px;
  background-color: var(--bg-light);
  color: var(--text-dark);
  -webkit-appearance: none;
  border-radius: 0;
  transition: border-color var(--transition-speed);
}

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

.error-text {
  color: var(--error-color);
  font-size: 11px;
  margin-top: 5px;
  display: none;
  text-align: left;
}

.form-group textarea {
  height: 200px;
  resize: vertical;
}

input.invalid,
textarea.invalid {
  border-color: var(--error-color) !important;
}

input::placeholder {
  color: var(--placeholder-color);
}

.submit-btn {
  width: 100%;
  max-width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
  transition: background var(--transition-speed);
  margin: 20px 0 0 0;
  -webkit-appearance: none;
  box-sizing: border-box;
  text-align: center;
}

.submit-btn:hover {
  opacity: 0.8;
}

/* --- WORKS Modal --- */
.modal-content.works-wide {
  max-width: 1600px;
  width: 90%;
  height: 90%;
  padding: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
  margin: 40px auto;
}

.works-content {
  overflow-y: scroll;
  overflow-x: hidden !important;
  flex-grow: 1;
  padding: 40px;
  text-align: left !important;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

#worksPlaceholder {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.works-content::-webkit-scrollbar {
  width: 6px;
}

.works-content::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

.works-content::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.works-content h1 {
  font-size: 22px;
  margin: 0 0 40px 0;
  color: var(--text-dark);
  text-align: center !important;
  width: 100%;
}

.works-content h1.sp {
  display: none;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px 40px;
  width: 100%;
  margin-bottom: 60px;
}

.works-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto !important;
  margin: 0;
  padding: 0;
}

.works-img {
  width: 100%;
  height: 460px;
  background-color: var(--bg-light);
  object-fit: cover;
  object-position: top;
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
  box-sizing: border-box;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.works-title {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  text-align: left !important;
}

.works-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 6px 0 0 0 !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  text-align: left !important;
}

.works-content .works-note {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 30px;
  padding-bottom: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  word-break: break-all !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  text-align: left !important;
}

/* --- Media Queries (Smartphone) --- */
@media all and (max-width:767px) {
  .main-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: visible;
    padding-top: 60px;
    padding-bottom: 80px;
    box-sizing: border-box;
  }

  h1 {
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0;
  }

  h1 img {
    width: 80% !important;
    max-width: none !important;
    height: auto;
    position: relative;
    left: -10px;
    margin: 0 auto 35px auto;
    transform: none;
    display: block;
  }

  small {
    position: static;
    display: block;
    margin: 60px 0 20px 0;
    transform: none;
    width: 100%;
  }

  section {
    position: static;
    transform: none;
    margin: 0 auto 40px auto;
    width: 90%;
  }

  h2 {
    font-size: 110%;
    margin-bottom: 30px;
  }

  p {
    width: 100%;
    font-size: 75%;
    text-align: left;
    letter-spacing: 0.03rem;
    line-height: 1.5rem;
  }

  br {
    display: none;
  }

  .btn-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 0;
    gap: 10px;
  }

  .open-btn {
    position: static;
    display: inline-block;
    transform: none !important;
    margin: 0;
    padding: 4px 10px 4px 10px !important;
    line-height: 1.1;
  }

  .modal-content {
    width: 90%;
    height: auto;
    max-height: 90vh;
    padding: 30px 20px;
    overflow-y: auto;
    background-color: var(--bg-white);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .modal-content::-webkit-scrollbar {
    display: none;
  }

  .modal-content.works-wide {
    padding: 0;
    width: 90%;
    height: 95%;
    margin: 20px auto;
  }

  .works-content {
    padding: 30px 30px;
  }

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

  .works-img {
    height: 300px;
    margin-bottom: 14px;
  }

  .works-title {
    font-size: 0.75rem;
  }

  .works-category {
    font-size: 0.65rem;
  }

  .works-content h1.pc {
    display: none;
  }

  .works-content h1.sp {
    display: block !important;
    font-size: 18px;
    margin-bottom: 30px;
  }

  .works-content p,
  .works-content h2,
  .works-content .works-note {
    width: 100% !important;
  }

  .contact-form p {
    width: 100%;
    text-align: left;
    margin-bottom: 20px;
    color: var(--text-dark);
  }

  .form-group textarea {
    height: 120px;
  }

  .contact-form h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-dark);
  }
}

/* reCAPTCHA badge hidden */
.grecaptcha-badge {
  visibility: hidden;
}