/* ---------------------------------------
   HemiHead Web Font
--------------------------------------- */
@font-face {
  font-family: "HemiHead";
  src: url("/assets/fonts/hemihead.woff2") format("woff2"),
       url("/assets/fonts/hemihead.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

/* ---------------------------------------
   Base
--------------------------------------- */
:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --sub: #4a5568;
  --line: #e2e8f0;
  --accent: #1e293b;
  --surface: #f8fafc;
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --shadow: rgba(15, 23, 42, 0.08);
  --shadow-hover: rgba(15, 23, 42, 0.12);
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --font-base: clamp(15px, 0.4vw + 14px, 17px);
  --font-lead: clamp(18px, 0.5vw + 17px, 20px);
  --font-hero: clamp(34px, 3vw + 16px, 56px);
  --font-section: clamp(28px, 1.5vw + 24px, 40px);
  --font-card-title: clamp(18px, 0.6vw + 17px, 22px);
  --font-small: clamp(13px, 0.2vw + 12px, 14px);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Montserrat", "Noto Sans JP", sans-serif;
  line-height: 1.7;
  font-size: var(--font-base);
  padding-top: 120px;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(30, 64, 175, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
}

/* 日本語ページでは Noto Sans JP を優先 */
html[lang="ja"] body {
  font-family: "Noto Sans JP", "Montserrat", sans-serif;
}


@media (max-width: 600px) {
  body {
    padding-top: 100px;
    font-size: 15px;
  }
}

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

a {
  color: var(--fg);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary);
}

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

@media (max-width: 600px) {
  .container {
    padding: 0 24px;
  }
}

/* ---------------------------------------
   Header (Fixed + Shrink on Scroll)
--------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 120px;
  padding: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

body.scrolled .site-header {
  height: 100px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

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

/* ---------------------------------------
   Logo
--------------------------------------- */
.brand {
  font-family: "HemiHead", sans-serif;
  font-size: 52px;
  font-weight: bold;
  letter-spacing: -1px;
  line-height: 1;
  transition: font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--accent);
}

.brand .logo-png {
  max-height: 100px; /* Matches brand font-size */
  width: auto;
  vertical-align: middle; /* Align with text elements if any */
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.scrolled .brand {
  font-size: 44px;
}

body.scrolled .brand .logo-png {
  max-height: 80px; /* Adjust for scrolled state */
}

@media (max-width: 600px) {
  .brand {
    font-size: 44px;
  }
  .brand .logo-png {
    max-height: 80px; /* Adjust for mobile */
  }
  body.scrolled .brand {
    font-size: 36px;
  }
  body.scrolled .brand .logo-png {
    max-height: 60px; /* Adjust for scrolled mobile state */
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  margin-left: 0;
  font-size: 15px;
  color: var(--fg);
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.nav a:hover {
  background-color: var(--surface);
  color: var(--primary);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: var(--primary);
  transition: transform 0.2s ease;
}

.nav a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* ---------------------------------------
   Footer
--------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 48px 0;
  margin-top: 80px;
}

.site-footer .foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.foot a {
  color: var(--sub);
  font-size: 14px;
  transition: color 0.2s ease;
}

.foot a:hover {
  color: var(--primary);
}

.copy {
  color: var(--sub);
  font-size: 13px;
}

/* ---------------------------------------
   Hero
--------------------------------------- */
.hero {
  padding: 100px 0 80px;
  position: relative;
  text-align: left; /* Added for global left alignment in hero */
}

@media (max-width: 600px) {
  .hero {
    padding: 60px 0 40px;
  }
}

.hero h1 {
  font-size: var(--font-hero);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 32px; /* Adjusted margin */
  font-weight: 700;
  max-width: 900px;
  color: var(--accent);
  text-align: left; /* Enforce left alignment */
}



.lead {
  font-size: var(--font-lead);
  color: var(--sub);
  max-width: 720px;
  line-height: 1.7;
  font-weight: 400;
  margin-left: 0; /* Enforce left alignment */
  margin-right: auto;
  text-align: left; /* Enforce left alignment */
}

@media (max-width: 600px) {
  .lead {
    font-size: 18px;
  }
}

/* ---------------------------------------
   Index Sections
--------------------------------------- */
.gallery {
  padding: 48px 0 72px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.tile {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  box-shadow: 0 1px 3px var(--shadow);
}

.tile:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow-hover);
}

.tile img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tile:hover img {
  transform: scale(1.05);
}

.tile .cap {
  padding: 24px;
  font-size: 16px;
  color: var(--fg);
  font-weight: 600;
  background: var(--bg);
}

.band {
  padding: 72px 0;
  border-top: 1px solid var(--line);
  position: relative;
  text-align: left;
}

.band::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

@media (max-width: 600px) {
  .band {
    padding: 60px 0;
  }
}

.section-title {
  font-size: var(--font-section);
  margin: 0 0 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--accent);
}

@media (max-width: 600px) {
  .section-title {
    font-size: calc(var(--font-section) - 4px);
  }
}

.kicker {
  color: var(--sub);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 600;
}

/* ---------------------------------------
   Service Cards
--------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 980px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
  display: block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px var(--shadow);
}

a.card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px var(--shadow-hover);
}

.card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

a.card:hover img {
  transform: scale(1.06);
}

.card .meta {
  padding: 32px;
  background: var(--bg);
}

.card .meta h3 {
  margin: 0 0 12px;
  font-size: var(--font-card-title);
  color: var(--accent);
  font-weight: 700;
  line-height: 1.3;
}

.card .meta p {
  margin: 0;
  font-size: calc(var(--font-base) - 1px);
  color: var(--sub);
  line-height: 1.6;
}

/* ---------------------------------------
   Service Details
--------------------------------------- */
.service-detail {
  max-width: 840px;
}

.service-detail h2 {
  font-size: 32px;
  margin: 48px 0 20px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.service-detail h2:first-of-type {
  margin-top: 0;
}

.service-detail h3 {
  font-size: 22px;
  margin: 48px 0 16px;
  color: var(--accent);
  font-weight: 600;
}

.service-detail ul {
  margin: 32px 0;
  padding-left: 0;
  list-style: none;
}

.service-detail li {
  margin: 20px 0;
  line-height: 1.8;
  color: var(--fg);
  padding-left: 28px;
  position: relative;
  font-size: var(--font-base);
}

.service-detail li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.service-detail li strong {
  color: var(--accent);
  font-weight: 600;
}

.service-detail p {
  margin: 28px 0;
  color: var(--fg);
  line-height: 1.8;
  font-size: calc(var(--font-base) + 1px);
}

/* ---------------------------------------
   About
--------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: start;
}

@media (max-width: 980px) {
  .split {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.split ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.split li {
  margin: 16px 0;
  padding-left: 24px;
  position: relative;
  line-height: 1.7;
  font-size: 16px;
}

.split li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
  font-size: 20px;
}

blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 24px;
  margin: 32px 0;
  color: var(--accent);
  font-style: italic;
  font-size: calc(var(--font-base) + 4px);
  line-height: 1.6;
  background: var(--surface);
  padding: 24px 24px 24px 28px;
  border-radius: 8px;
}

/* ---------------------------------------
   Contact Form
--------------------------------------- */
.form {
  max-width: 640px;
}

label {
  display: block;
  margin: 24px 0 8px;
  font-size: var(--font-small);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.01em;
}

label:first-of-type {
  margin-top: 0;
}

input,
textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: var(--font-base);
  background: var(--bg);
  color: var(--fg);
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

button.btn {
  margin-top: 32px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  padding: 16px 36px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.15);
}

button.btn:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.25);
}

button.btn:active {
  transform: translateY(0);
}

.muted {
  color: var(--sub);
  font-size: var(--font-small);
  margin-top: 20px;
  line-height: 1.6;
}

/* ---------------------------------------
   Legal
--------------------------------------- */
.legal-dl {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px 32px;
}

@media (max-width: 600px) {
  .legal-dl {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.legal-dl dt {
  font-weight: 600;
  color: var(--accent);
  font-size: calc(var(--font-base) - 1px);
}

.legal-dl dd {
  margin: 0;
  color: var(--fg);
  line-height: 1.7;
  font-size: calc(var(--font-base) - 1px);
}

/* ---------------------------------------
   Button Styles
--------------------------------------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  padding: 16px 36px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.15);
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.25);
  color: var(--bg);
}

.btn:active {
  transform: translateY(0);
}

/* ---------------------------------------
   Feature Grid
--------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 48px;
}

@media (max-width: 980px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ---------------------------------------
   Responsive
--------------------------------------- */
@media (max-width: 980px) {
  .grid,
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 36px;
  }
  .grid,
  .cards {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------
   Scroll Animation
--------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Override lead centering within band sections */
.band .lead {
  margin-left: 0;
  margin-right: 0;
}
