:root {
  --primary: #000000;
  --primary-hover: #333333;
  --bg-main: #ffffff;
  --bg-secondary: #f9f9f9;
  --text-main: #111111;
  --text-muted: #666666;
  --border: #e0e0e0;
  --border-dark: #111111;
  --card-bg: #ffffff;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Typography */
.text-gradient {
  /* Using solid bold color instead of gradient for agency feel */
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-dark);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #fff;
  color: var(--primary);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
}

.header.scrolled {
  padding: 16px 0;
}

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

.logo a {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-main);
  text-transform: uppercase;
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 3rem;
}

.nav a {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--text-main);
  transition: var(--transition);
}

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

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  background-color: var(--text-main);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
}

.hero-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5); /* Dark overlay to make text pop */
}

.hero-container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-content {
  width: 100%;
  padding: 0 24px;
  text-align: left;
}

.hero-text-block {
  display: inline-block;
  text-align: left;
}

.hero-title {
  font-size: clamp(3rem, 5.5vw, 5.5rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 2rem;
  letter-spacing: -0.03em;
  color: #ffffff;
  word-break: keep-all;
  overflow-wrap: normal;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #f0f0f0;
  margin-bottom: 0; /* Removed margin to perfectly center vertically */
  line-height: 2;
  font-weight: 700;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

/* Common Section */
.section {
  padding: 120px 0;
}

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

.section-header {
  position: relative;
  padding-bottom: 1.5rem;
  margin-bottom: 5rem;
}
.section-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  background-color: var(--text-main);
}
.text-white .section-header::after {
  background-color: #ffffff;
}

.section-header h2 {
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  text-transform: uppercase;
  line-height: 1.3;
  word-break: keep-all;
  overflow-wrap: normal;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  display: block;
}

/* About Section */
.about-grid {
  display: flex;
  gap: 6rem;
}

.about-text {
  flex: 1;
  font-size: 1.15rem;
  color: var(--text-main);
  line-height: 2;
  font-weight: 500;
}

.about-text p {
  margin-bottom: 2rem;
}

.about-image {
  flex: 1;
}
.about-image img {
  filter: grayscale(100%);
  transition: var(--transition);
}
.about-image:hover img {
  filter: grayscale(0%);
}

/* Service Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.feature-item {
  padding: 0;
  background: transparent;
  border-top: 2px solid var(--text-main);
  padding-top: 2rem;
  transition: var(--transition);
}

.feature-item:hover {
  transform: translateY(-5px);
}

.feature-icon-wrapper {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text-main);
}

.feature-item h4 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  font-weight: 800;
}

.feature-item p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.service-action {
  margin-top: 5rem;
}

/* Solution Section */
.solution-list {
  display: flex;
  flex-direction: column;
}

.solution-item {
  display: flex;
  align-items: center;
  padding: 4rem 0;
  gap: 4rem;
  border-bottom: 1px solid var(--border);
}

.solution-item:first-child {
  border-top: 1px solid var(--border);
}

.solution-problem, .solution-answer {
  flex: 1;
}

.badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge-problem {
  color: var(--text-muted);
}

.badge-solution {
  color: var(--text-main);
}

.solution-arrow {
  font-size: 1.5rem;
  color: var(--border);
  font-weight: 300;
}

.solution-problem h4 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
  font-weight: 800;
}

.solution-problem p, .solution-answer p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.solution-answer p {
  font-weight: 600;
  color: var(--text-main);
}

/* Knowledge Section */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
}

.knowledge-card {
  display: flex;
  flex-direction: column;
  group;
}

.knowledge-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  margin-bottom: 2rem;
  filter: grayscale(100%);
  transition: var(--transition);
}

.knowledge-card:hover .knowledge-thumb {
  filter: grayscale(0%);
}

.knowledge-content {
  padding: 0;
}

.knowledge-tag {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-main);
  margin-bottom: 1rem;
  font-weight: 700;
  border: 1px solid var(--text-main);
  padding: 4px 12px;
}

.knowledge-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  line-height: 1.5;
  color: var(--text-main);
  font-weight: 800;
}

.knowledge-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Contact Section */
.text-center {
  text-align: center;
}

.contact-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.contact-text {
  font-size: 1.15rem;
  color: var(--text-main);
  line-height: 2;
  font-weight: 500;
  margin-bottom: 3rem;
}

/* Contact Form */
.contact-form {
  text-align: left;
  background: var(--bg-main);
  padding: 3rem;
  border: 1px solid var(--border);
  border-top: 4px solid var(--text-main);
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.required {
  color: #e63946;
  margin-left: 4px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-main);
  transition: var(--transition);
  border-radius: 0;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--text-main);
  background: var(--bg-main);
}

.btn-submit {
  width: 100%;
  padding: 20px;
  font-size: 1.1rem;
  margin-top: 1rem;
}

/* Footer */
.footer {
  padding: 6rem 0 4rem;
  background: var(--text-main);
  color: #fff;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 3rem;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-links a {
  color: #a0a0a0;
  font-size: 0.95rem;
  font-weight: 600;
}

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

.copyright {
  color: #666;
  font-size: 0.85rem;
  border-top: 1px solid #333;
  padding-top: 2rem;
}

/* Animations */
.animate-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 900px) {
  .hero-container, .about-grid {
    flex-direction: column-reverse;
    gap: 3rem;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .section-header h2 {
    font-size: 3rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .solution-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    padding: 3rem 0;
  }
  
  .solution-arrow {
    transform: rotate(90deg);
  }
  
  .knowledge-grid {
    grid-template-columns: 1fr;
  }
  
  .nav {
    display: none;
  }
  
  .contact-content {
    padding: 3rem;
  }
}

/* Premium Article Layout */
.article-page {
  padding-top: 80px;
}

.article-hero {
  position: relative;
  width: 100%;
  height: 45vh;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3rem;
}

.article-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.article-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 100%);
  z-index: -1;
}

.article-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.article-hero-content .knowledge-tag {
  background: var(--text-main);
  color: #fff;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: 2rem;
}

.article-title {
  color: #ffffff;
  font-size: clamp(1.5rem, 3.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: break-word;
  max-width: 100%;
  margin: 0;
}

.article-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 6rem;
  padding-top: 6rem;
  padding-bottom: 8rem;
}

.article-sidebar {
  position: relative;
}

.sticky-sidebar {
  position: sticky;
  top: 120px;
}

.article-meta-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.article-date {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.share-links {
  display: flex;
  gap: 1rem;
}

.share-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  transition: var(--transition);
}

.share-links a:hover {
  background: var(--text-main);
  color: #ffffff;
  border-color: var(--text-main);
}

.article-body {
  max-width: 800px;
}

.article-lead {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.7;
  margin-bottom: 4rem;
  color: var(--text-main);
}

.article-body h2 {
  font-size: 2.25rem;
  font-weight: 900;
  margin: 5rem 0 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--text-main);
  letter-spacing: -0.03em;
}

.article-body h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 3.5rem 0 1.5rem;
  color: var(--text-main);
}

.article-body p {
  font-size: 1.15rem;
  line-height: 1.9;
  margin-bottom: 2rem;
  color: #222222;
}

.article-body ul {
  font-size: 1.15rem;
  line-height: 1.9;
  margin-bottom: 2.5rem;
  padding-left: 2rem;
  color: #222222;
}

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

@media (max-width: 900px) {
  .article-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-top: 4rem;
  }
  .sticky-sidebar {
    position: relative;
    top: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-divider {
    display: none;
  }
  .article-title br {
    display: none;
  }
}

/* ==========================================================================
   Mobile Optimization (max-width: 768px)
   ========================================================================== */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  width: 30px;
  height: 24px;
  position: relative;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  position: absolute;
  left: 0;
  transition: var(--transition);
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

body.nav-open .hamburger span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
body.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
}
body.nav-open .hamburger span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

body.nav-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  /* Container & Typography */
  .container {
    padding: 0 20px;
  }
  
  h1, h2, h3, h4, h5, h6, .section-title, .hero-title, .article-title, .section-header h2 { 
    word-break: break-all;
    overflow-wrap: break-word;
  }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
  .section-title { font-size: 2.2rem; }
  .section-header h2 { font-size: 2rem; }

  /* Header & Hamburger */
  .header {
    padding: 12px 0;
  }
  .header.scrolled {
    padding: 8px 0;
  }
  .logo a {
    font-size: 1.25rem;
  }

  .hamburger {
    display: block;
  }
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
  }

  body.nav-open .nav {
    opacity: 1;
    visibility: visible;
  }

  .nav ul {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .nav a {
    font-size: 1.2rem;
  }

  /* Hero */
  .hero {
    padding-top: 80px;
    min-height: 100vh;
    min-height: 100svh;
  }
  .hero-content {
    padding: 0;
  }
  .hero-title {
    font-size: 2rem;
    word-break: break-all;
    overflow-wrap: break-word;
  }
  .hero-subtitle {
    font-size: 1rem;
    word-break: break-all;
  }
  .hero-subtitle br {
    display: none;
  }

  /* Sections */
  .section {
    padding: 80px 0;
  }
  .section-header {
    padding-top: 2.5rem;
    border-top: 2px solid var(--border);
  }
  .text-white .section-header {
    border-top-color: rgba(255, 255, 255, 0.2);
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .solution-flow {
    flex-direction: column;
    align-items: center;
  }
  .flow-arrow {
    transform: rotate(90deg);
    margin: 1rem 0;
  }
  .knowledge-grid {
    grid-template-columns: 1fr;
  }

  /* Contact Form */
  .contact-content {
    padding: 1rem;
  }
  .contact-form {
    padding: 1.5rem;
  }
  .contact-text {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  /* Footer */
  .footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }
  .footer-links {
    justify-content: center;
    margin-top: 1rem;
  }
  
  /* Article details */
  .article-header {
    padding: 100px 20px 40px;
  }
  .article-title {
    font-size: 2rem;
  }
}
