/* ============================================
   山河株式会社 | SANKA CO., LTD.
   Design: Mountain + River × Technology
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --mountain: #1e3a5f;
  --mountain-light: #2c4a7a;
  --river: #3d8b8b;
  --river-light: #5aabab;
  --gold: #c4a35a;
  --bg: #faf8f5;
  --surface: #ffffff;
  --soft: #e8ddd0;
  --border: #e8e3dc;
  --text: #1a1a2e;
  --text-muted: #5a6a7e;
  --radius: 1rem;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03);
  --shadow-hover: 0 1px 3px rgba(0,0,0,0.06), 0 8px 30px rgba(0,0,0,0.06);
  --max-width: 1152px;
}

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

body {
  font-family: 'Inter', 'Noto Sans JP', 'Hiragino Sans', Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(61,139,139,0.15); color: var(--mountain); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== Layout ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}
.header.scrolled { border-bottom-color: var(--border); box-shadow: 0 1px 6px rgba(0,0,0,0.04); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 6rem; max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem;
}

.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo .logo-icon { width: 6rem; height: 6rem; flex-shrink: 0; }
.logo-text { font-size: 1.25rem; font-weight: 700; color: var(--mountain); letter-spacing: 0.05em; }
.logo-sub { font-size: 0.6875rem; color: var(--river); letter-spacing: 0.15em; display: none; }

@media (min-width: 640px) { .logo-sub { display: block; } }

/* Navigation */
.nav { display: none; align-items: center; gap: 0.125rem; }
.nav a {
  padding: 0.5rem 1rem; font-size: 1rem; font-weight: 500;
  color: var(--text-muted); border-radius: 0.5rem;
  transition: all 0.2s ease; position: relative;
}
.nav a:hover { color: var(--mountain); background: rgba(232,221,208,0.3); }
.nav a.active { color: var(--mountain); background: rgba(232,221,208,0.5); }
.nav a.active::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 1.25rem; height: 2px; background: var(--river); border-radius: 1px;
}

@media (min-width: 768px) { .nav { display: flex; } }

/* Mobile menu button */
.menu-btn {
  display: flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border: none; background: none;
  color: var(--text-muted); border-radius: 0.5rem; cursor: pointer;
  transition: all 0.2s ease;
}
.menu-btn:hover { color: var(--mountain); background: rgba(232,221,208,0.3); }
@media (min-width: 768px) { .menu-btn { display: none; } }

/* Mobile nav */
.mobile-nav {
  display: none; border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.95); backdrop-filter: blur(16px);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; padding: 0.875rem 1.5rem; font-size: 1.0625rem; font-weight: 500;
  color: var(--text-muted); transition: all 0.2s ease;
}
.mobile-nav a:hover, .mobile-nav a.active {
  color: var(--mountain); background: rgba(232,221,208,0.5);
}

/* ===== Footer ===== */
.footer { background: var(--mountain); color: #fff; }
.footer-mountain {
  height: 3.5rem; background: var(--bg); overflow: hidden;
}
.footer-mountain svg { width: 100%; height: 100%; }
.footer-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 4rem 1.5rem;
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
}
@media (min-width: 768px) { .footer-inner { grid-template-columns: 1fr 1fr 1fr; } }

.footer h3 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 1.25rem; letter-spacing: 0.05em; opacity: 0.9; }
.footer p, .footer a { font-size: 0.9375rem; opacity: 0.55; line-height: 1.9; }
.footer a { display: block; margin-bottom: 0.5rem; transition: color 0.2s ease; }
.footer a:hover { color: var(--gold); opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center; padding: 1.5rem; font-size: 0.8125rem; opacity: 0.4;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: inherit; font-weight: 600; border: none; cursor: pointer;
  border-radius: 0.75rem; transition: all 0.3s ease; text-decoration: none;
}
.btn-primary {
  background: var(--mountain); color: #fff;
  box-shadow: 0 2px 8px rgba(30,58,95,0.2);
}
.btn-primary:hover { background: var(--mountain-light); box-shadow: 0 4px 16px rgba(30,58,95,0.3); transform: translateY(-1px); }
.btn-secondary {
  background: var(--river); color: #fff;
  box-shadow: 0 2px 8px rgba(61,139,139,0.2);
}
.btn-secondary:hover { background: var(--river-light); box-shadow: 0 4px 16px rgba(61,139,139,0.3); transform: translateY(-1px); }
.btn-outline {
  border: 2px solid var(--mountain); color: var(--mountain); background: transparent;
}
.btn-outline:hover { background: var(--mountain); color: #fff; }
.btn-sm { padding: 0.625rem 1.25rem; font-size: 0.9375rem; }
.btn-md { padding: 0.875rem 1.875rem; font-size: 1rem; }
.btn-lg { padding: 1.125rem 2.5rem; font-size: 1.0625rem; }

/* ===== Section Title ===== */
.section-label {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-size: 0.8125rem; font-weight: 600; color: var(--river);
  letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 1.25rem;
}
.section-label::before, .section-label::after {
  content: ''; width: 1.5rem; height: 1px; background: rgba(61,139,139,0.4);
}
.section-title {
  font-size: 2rem; font-weight: 800; color: var(--mountain);
  margin-bottom: 1.25rem; letter-spacing: -0.02em; line-height: 1.35;
}
.section-subtitle {
  font-size: 1.0625rem; color: var(--text-muted); max-width: 38rem;
  margin: 0 auto; line-height: 1.9;
}
@media (min-width: 640px) { .section-title { font-size: 2.25rem; } }
@media (min-width: 1024px) { .section-title { font-size: 2.5rem; } }

.text-center { text-align: center; }
.text-left { text-align: left; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ===== Cards ===== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  box-shadow: var(--shadow); transition: all 0.4s ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

/* ===== Service Card ===== */
.service-card .service-icon { font-size: 3rem; margin-bottom: 1.25rem; display: inline-block; transition: transform 0.4s ease; }
.service-card:hover .service-icon { transform: scale(1.1); }
.service-card h3 { font-size: 1.25rem; font-weight: 700; color: var(--mountain); margin-bottom: 0.75rem; transition: color 0.3s ease; }
.service-card:hover h3 { color: var(--river); }
.service-card p { font-size: 1rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 1.25rem; }
.service-card ul { display: flex; flex-direction: column; gap: 0.5rem; }
.service-card li { font-size: 0.9375rem; color: var(--text-muted); display: flex; align-items: flex-start; gap: 0.5rem; }
.service-card li::before { content: '▸'; color: var(--river); flex-shrink: 0; font-size: 0.9375rem; }

/* ===== Solution Card ===== */
.solution-card .solution-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.solution-card .solution-icon {
  width: 2.75rem; height: 2.75rem; border-radius: 0.75rem;
  background: rgba(232,221,208,0.6); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.4s ease;
}
.solution-card:hover .solution-icon { background: rgba(61,139,139,0.12); }
.solution-card .solution-icon svg { width: 1.375rem; height: 1.375rem; color: var(--river); }
.solution-card h3 { font-size: 1.1875rem; font-weight: 700; color: var(--mountain); transition: color 0.3s ease; line-height: 1.4; }
.solution-card:hover h3 { color: var(--river); }
.solution-card .solution-body { padding-left: 3.75rem; display: flex; flex-direction: column; gap: 1.25rem; }
.solution-card .solution-body h4 { font-size: 0.8125rem; font-weight: 700; margin-bottom: 0.375rem; letter-spacing: 0.1em; text-transform: uppercase; }
.solution-card .solution-body h4.challenge { color: var(--river); }
.solution-card .solution-body h4.offering { color: var(--mountain); }
.solution-card .solution-body h4.effect { color: var(--gold); }
.solution-card .solution-body p { font-size: 1rem; color: var(--text-muted); line-height: 1.9; }

/* ===== Company Table ===== */
.company-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.company-table table { width: 100%; border-collapse: collapse; }
.company-table th {
  width: 28%; padding: 1.25rem 1.5rem; background: var(--bg);
  text-align: left; font-size: 1rem; font-weight: 600; color: var(--mountain); white-space: nowrap;
}
.company-table td { padding: 1.25rem 1.5rem; font-size: 1rem; color: var(--text-muted); line-height: 1.9; white-space: pre-wrap; }
.company-table tr:not(:last-child) th, .company-table tr:not(:last-child) td { border-bottom: 1px solid var(--border); }
@media (min-width: 640px) { .company-table th { width: 22%; padding: 1.5rem 2rem; } .company-table td { padding: 1.5rem 2rem; } }

/* ===== Google Map ===== */
.map-wrapper {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.map-wrapper iframe { width: 100%; height: 360px; border: none; display: block; }

/* ===== Contact Form ===== */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 1rem; font-weight: 600; color: var(--mountain); margin-bottom: 0.5rem; }
.form-group label .required { color: var(--gold); }
.form-group input, .form-group textarea {
  width: 100%; padding: 0.875rem 1rem; font-family: inherit; font-size: 1rem;
  color: var(--text); background: var(--bg); border: 1px solid var(--border);
  border-radius: 0.75rem; transition: all 0.3s ease; outline: none;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #aaa299; }
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--river); box-shadow: 0 0 0 3px rgba(61,139,139,0.08);
}
.form-group textarea { resize: vertical; min-height: 160px; }

/* Success message */
.form-success {
  text-align: center; padding: 2.5rem 2rem; display: none;
}
.form-success .success-icon {
  width: 4rem; height: 4rem; border-radius: 1rem;
  background: rgba(232,221,208,0.6); display: flex;
  align-items: center; justify-content: center; margin: 0 auto 1.5rem;
}
.form-success h3 { font-size: 1.375rem; font-weight: 700; color: var(--mountain); margin-bottom: 0.75rem; }
.form-success p { font-size: 1rem; color: var(--text-muted); line-height: 1.9; }

/* ===== Hero ===== */
.hero {
  position: relative; background: var(--bg); overflow: hidden;
  padding: 5rem 0 8rem;
}
.hero .dot-bg {
  position: absolute; inset: 0; opacity: 0.4;
  background-image: radial-gradient(circle, var(--soft) 1px, transparent 1px);
  background-size: 24px 24px;
}
.hero .blob {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.04;
}
.hero .blob-1 { width: 500px; height: 500px; background: var(--river); top: -160px; right: -160px; animation: breathe 10s ease-in-out infinite; }
.hero .blob-2 { width: 400px; height: 400px; background: var(--mountain); bottom: -80px; left: -80px; animation: breathe 8s ease-in-out 2s infinite; }

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.04; }
  50% { transform: scale(1.05); opacity: 0.06; }
}

.hero-content { position: relative; max-width: 45rem; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1.125rem; border: 1px solid rgba(61,139,139,0.3);
  border-radius: 2rem; background: rgba(255,255,255,0.8);
  font-size: 0.875rem; font-weight: 500; color: var(--river); margin-bottom: 2rem;
}
.hero-tag .dot { width: 0.375rem; height: 0.375rem; border-radius: 50%; background: var(--river); }
.hero h1 {
  font-size: 2.25rem; font-weight: 800; color: var(--mountain);
  line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 1.5rem;
}
.hero h1 .accent { color: var(--river); }
.hero p {
  font-size: 1.125rem; color: var(--text-muted); line-height: 1.9;
  max-width: 34rem; margin-bottom: 2.5rem;
}
.hero-buttons { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-mountain {
  position: absolute; bottom: 0; left: 0; right: 0; height: 6rem;
  pointer-events: none; opacity: 0.06;
}
.hero-mountain svg { width: 100%; height: 100%; }

@media (min-width: 640px) { .hero { padding: 7rem 0 10rem; } .hero h1 { font-size: 2.75rem; } .hero p { font-size: 1.1875rem; } }
@media (min-width: 1024px) { .hero { padding: 9rem 0 12rem; } .hero h1 { font-size: 3.25rem; } }

/* ===== Page Header (sub pages) ===== */
.page-header {
  position: relative; background: var(--bg); overflow: hidden;
  padding: 4rem 0 3rem;
}
.page-header .dot-bg {
  position: absolute; inset: 0; opacity: 0.3;
  background-image: radial-gradient(circle, var(--soft) 1px, transparent 1px);
  background-size: 24px 24px;
}
.page-header h1 {
  position: relative; font-size: 2.25rem; font-weight: 800; color: var(--mountain);
  letter-spacing: -0.02em; margin-bottom: 0.75rem;
}
.page-header p { position: relative; font-size: 1.0625rem; color: var(--text-muted); max-width: 38rem; line-height: 1.9; }
@media (min-width: 640px) { .page-header { padding: 5rem 0 3rem; } .page-header h1 { font-size: 2.75rem; } }
@media (min-width: 1024px) { .page-header h1 { font-size: 3.25rem; } }

/* ===== Sections ===== */
.section { padding: 4.5rem 0; }
.section-white { background: var(--surface); }
.section-bg { background: var(--bg); }
.section-mountain {
  background: var(--mountain); color: #fff;
  position: relative; overflow: hidden;
}
.section-mountain .mountain-pattern {
  position: absolute; inset: 0; opacity: 0.04;
}
.section-mountain .mountain-pattern svg { width: 100%; height: 100%; }
.section-mountain h2 { color: #fff; }
.section-mountain .section-subtitle { color: rgba(255,255,255,0.6); }

@media (min-width: 640px) { .section { padding: 5.5rem 0; } }
@media (min-width: 1024px) { .section { padding: 7rem 0; } }

/* ===== Grids ===== */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }

@media (min-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Pain Point Numbers ===== */
.pain-number {
  font-size: 2.25rem; font-weight: 800; color: var(--soft);
  margin-bottom: 0.75rem; transition: color 0.4s ease;
}
.card:hover .pain-number { color: rgba(61,139,139,0.2); }

/* ===== Mountain Divider ===== */
.mountain-divider {
  height: 3.5rem; background: var(--surface); overflow: hidden;
}
.mountain-divider .curve {
  width: 100%; height: 3.5rem; background: var(--bg);
  border-radius: 60% 60% 0 0 / 100% 100% 0 0;
}
@media (min-width: 640px) {
  .mountain-divider .curve { border-radius: 80% 80% 0 0 / 100% 100% 0 0; }
}

/* ===== River Line ===== */
.river-line {
  max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem;
}
.river-line-inner {
  height: 2px; background: linear-gradient(90deg, transparent, var(--river), transparent);
  border-radius: 1px;
}

/* ===== Service Detail (services page) ===== */
.service-detail {
  display: flex; flex-direction: column; gap: 2rem; align-items: flex-start;
  margin-bottom: 5.5rem;
}
.service-detail:last-child { margin-bottom: 0; }
.service-detail .detail-summary { flex-shrink: 0; }
.service-detail .detail-summary .card { position: sticky; top: 6rem; }
.service-detail .detail-examples { flex: 1; min-width: 0; }

.service-detail .detail-summary .icon-lg { font-size: 4rem; margin-bottom: 1.25rem; }
.service-detail .detail-summary h2 { font-size: 1.75rem; font-weight: 700; color: var(--mountain); margin-bottom: 0.75rem; }

@media (min-width: 1024px) {
  .service-detail { flex-direction: row; gap: 3.5rem; margin-bottom: 7rem; }
  .service-detail.reverse { flex-direction: row-reverse; }
  .service-detail .detail-summary { width: 38%; }
  .service-detail .detail-examples { width: 62%; }
}

.detail-examples h3 {
  font-size: 1.125rem; font-weight: 700; color: var(--mountain);
  padding-bottom: 1rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}
.detail-examples ul { display: flex; flex-direction: column; gap: 1rem; }
.detail-examples li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  font-size: 1rem; color: var(--text-muted); line-height: 1.8;
}
.detail-examples li::before {
  content: '▸'; color: var(--river); flex-shrink: 0; margin-top: 0.125rem;
  transition: transform 0.2s ease;
}
.detail-examples li:hover::before { transform: translateX(3px); }

/* ===== Strength Cards ===== */
.strength-card { text-align: center; }
.strength-icon {
  width: 2.75rem; height: 2.75rem; border-radius: 0.75rem;
  background: rgba(232,221,208,0.6); display: flex;
  align-items: center; justify-content: center; margin: 0 auto 1rem;
  transition: background 0.4s ease;
}
.strength-card:hover .strength-icon { background: rgba(61,139,139,0.12); }
.strength-icon svg { width: 1.375rem; height: 1.375rem; color: var(--river); }
.strength-card h3 { font-size: 1.25rem; font-weight: 700; color: var(--mountain); margin-bottom: 0.75rem; }
.strength-card p { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.8; }

/* ===== Process Steps ===== */
.process-step { text-align: center; }
.process-number {
  font-size: 2.25rem; font-weight: 800; color: var(--soft);
  margin-bottom: 0.75rem; transition: color 0.4s ease;
}
.card:hover .process-number { color: rgba(61,139,139,0.2); }
.process-step h3 { font-size: 1.125rem; font-weight: 700; color: var(--mountain); margin-bottom: 0.5rem; }
.process-step p { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.8; }

/* ===== Contact alt cards ===== */
.contact-alt { text-align: center; }
.contact-alt .alt-icon { font-size: 1.75rem; margin-bottom: 1rem; }
.contact-alt h3 { font-size: 1.125rem; font-weight: 700; color: var(--mountain); margin-bottom: 0.75rem; }
.contact-alt p { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.8; }

/* ===== Spacing utilities ===== */
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-14 { margin-top: 3.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.gap-5 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* ===== Footer logo ===== */
.footer-logo { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.footer-logo .footer-logo-icon { width: 5rem; height: 5rem; }
.footer-logo span { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.05em; }

/* ===== Responsive ===== */
@media (max-width: 639px) {
  .hero-mountain { height: 3rem; }
  .page-header { padding: 3rem 0 2rem; }
  .page-header h1 { font-size: 1.875rem; }
  .hero h1 { font-size: 1.875rem; }
}
