/* DESIGN SYSTEM & COMMON STYLES */
:root {
  --bg: #ffffff;
  --text-main: #0b0b0b;
  --text-muted: #6b6b6b;
  --line: #e5e5e5;
  --subtle: #f5f5f5;
  --accent: #0b0b0b;
  --font-jp: "Noto Sans JP", sans-serif;
  --font-en: "Manrope", sans-serif;
  --easing: cubic-bezier(0.16, 1, 0.3, 1);
  --fade-easing: cubic-bezier(0.4, 0, 0.2, 1);
  --container-width: 90%;
  --max-width: 1400px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-jp);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  opacity: 0;
  animation: pageFadeIn 0.8s ease forwards;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* COMMON UTILITIES */
a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.3s;
}

a:hover {
  opacity: 0.7;
}

ul {
  list-style: none;
}

img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%) contrast(1.1);
  transition: filter 0.5s var(--easing), transform 0.7s var(--easing);
}

.hover-color img:hover {
  filter: grayscale(0%) contrast(1);
  transform: scale(1.02);
}

.container {
  width: var(--container-width);
  max-width: var(--max-width);
  margin: 0 auto;
}

.en {
  font-family: var(--font-en);
  letter-spacing: 0.02em;
}

.section-padding {
  padding: 140px 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 80px 0;
  }
}

/* TYPOGRAPHY */
.heading-hero {
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-family: var(--font-en);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  color: var(--text-main);
}

.heading-lg {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-family: var(--font-en);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 3rem;
}

.heading-philosophy {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 2rem;
  font-family: var(--font-jp);
  letter-spacing: -0.02em;
}

.heading-md {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.text-body {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 2.2;
}

.text-small {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2.5rem;
  background: var(--text-main);
  color: #fff;
  font-family: var(--font-en);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 99px;
  transition: transform 0.3s var(--easing), background 0.3s;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #333;
  transform: translateY(-2px);
  opacity: 1;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--text-main);
  color: #fff;
  border-color: var(--text-main);
  opacity: 1;
}

/* ANIMATIONS */
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 1px solid var(--text-main);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background-color 0.3s;
  mix-blend-mode: difference;
  display: none;
}

.cursor.hovered {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.9);
  border-color: transparent;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--easing), transform 1s var(--easing);
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 2rem 0;
  transition: all 0.4s var(--easing);
  mix-blend-mode: exclusion;
  color: #fff;
}

.header.scrolled,
.header.header-solid {
  padding: 1.2rem 0;
  mix-blend-mode: normal;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  color: var(--text-main);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  font-family: var(--font-en);
  z-index: 101;
}

.nav-list {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  position: relative;
  font-family: var(--font-en);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* HERO (TOP) */
.hero {
  height: 100vh;
  min-height: 800px;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 60px;
}

.hero-sub {
  margin-top: 2rem;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

/* Marquee */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--subtle);
}

.marquee-content {
  display: inline-block;
  animation: marquee 30s linear infinite;
}

.marquee-item {
  font-family: var(--font-en);
  font-size: 4rem;
  font-weight: 800;
  margin-right: 4rem;
  color: rgba(0, 0, 0, 0.05);
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.2);
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Service List */
.service-item {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  gap: 4rem;
  padding: 5rem 0;
  border-top: 1px solid var(--line);
  align-items: center;
}

.service-num {
  font-family: var(--font-en);
  font-size: 4rem;
  font-weight: 300;
  color: var(--line);
  line-height: 1;
}

.service-content h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.service-image {
  height: 300px;
  background: #f0f0f0;
  overflow: hidden;
  position: relative;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Strength */
.strength-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 6rem;
  align-items: center;
}

.strength-img-box img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16/10;
}

.feature-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.feature-list li::before {
  content: "●";
  font-size: 0.5rem;
  color: var(--text-main);
}

/* Footer */
.footer {
  background: #111;
  color: #fff;
  padding: 6rem 0 2rem;
}

.footer a {
  opacity: 0.7;
  transition: 0.3s;
}

.footer a:hover {
  opacity: 1;
}

/* SUBPAGE HEADER */
.subpage-header {
  padding: 180px 0 80px;
  background: var(--subtle);
  margin-bottom: 80px;
}

/* Services page */
.detail-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 8rem;
  align-items: center;
}

.detail-block:nth-child(even) {
  direction: rtl;
}
.detail-block:nth-child(even) .text-area {
  direction: ltr;
}

/* Contact form */
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ccc;
  background: transparent;
}

/* Article list */
.filter-nav {
  display: flex;
  gap: 1rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid var(--line);
  padding: 0.5rem 1.5rem;
  border-radius: 99px;
  font-size: 0.875rem;
  background: transparent;
  transition: 0.3s;
  font-family: var(--font-en);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--text-main);
  color: #fff;
  border-color: var(--text-main);
}

.article-list {
  display: grid;
  gap: 0;
}

.article-item {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 120px 100px 1fr auto;
  align-items: baseline;
  transition: background 0.3s, padding-left 0.3s;
  gap: 2rem;
}

.article-item:hover {
  background: var(--subtle);
  padding-left: 1rem;
}

.article-date {
  font-family: var(--font-en);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.category-label {
  font-family: var(--font-en);
  font-size: 0.75rem;
  border: 1px solid var(--line);
  padding: 0.1rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
  text-align: center;
  color: var(--text-muted);
  width: fit-content;
}

.article-title {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
}

.arrow-icon {
  width: 24px;
  height: 24px;
  opacity: 0;
  transform: translateX(-10px);
  transition: 0.3s;
}

.article-item:hover .arrow-icon {
  opacity: 1;
  transform: translateX(0);
}

.pagination {
  display: flex;
  gap: 1rem;
  margin-top: 6rem;
  justify-content: center;
}

.page-link {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--font-en);
  font-size: 0.875rem;
  transition: 0.3s;
}

.page-link:hover,
.page-link.active {
  background: var(--text-main);
  color: #fff;
  border-color: var(--text-main);
}

/* Single article */
.article-header {
  padding: 180px 0 60px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.article-title-single {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 3rem;
}

.article-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  filter: grayscale(100%);
  margin-bottom: 5rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 2;
}

.article-body h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 4rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.article-body h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 3rem 0 1rem;
}

.article-body p {
  margin-bottom: 2rem;
  color: #333;
}
.article-body img {
  margin: 3rem 0;
  width: 100%;
  height: auto;
  filter: grayscale(100%);
}

.article-body ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 2rem;
  color: #333;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-footer {
  margin-top: 8rem;
  border-top: 1px solid var(--line);
  padding-top: 4rem;
  text-align: center;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Works archive */
.case-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.8;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

/* Loading screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--bg);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 1.5s var(--fade-easing),
    visibility 1.5s var(--fade-easing);
}

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

.loading-wrapper {
  position: relative;
  display: inline-block;
}

.loading-text-ghost {
  font-family: var(--font-en);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  visibility: hidden;
  white-space: nowrap;
  user-select: none;
}

.loading-logo {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  font-family: var(--font-en);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--text-main);
  width: 0;
  animation: typing 1.2s steps(20, end) forwards, blink 0.4s step-end infinite;
}

.loading-logo.typing-done {
  border-right-color: transparent;
  animation: none;
  width: 100%;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}
@keyframes blink {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: var(--text-main);
  }
}

@media (max-width: 900px) {
  .heading-hero {
    font-size: 13vw;
  }
  .service-item {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 0;
  }

  .service-image {
    height: 200px;
    order: -1;
  }
  .strength-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .nav-list {
    display: none;
  }
  .heading-hero.subpage {
    font-size: 3rem;
  }
  .detail-block,
  .detail-block:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .article-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    align-items: center;
  }
  .article-date,
  .category-label {
    width: auto;
  }
  .article-header {
    padding-top: 120px;
    text-align: left;
  }
  .article-meta.single {
    justify-content: flex-start;
  }
  .article-thumb {
    aspect-ratio: 3/2;
    margin-bottom: 3rem;
  }
}

