/* =====================================================
   株式会社ナコード - Corporate Site CSS
   NACODE Co., Ltd.
   Design: Elegant, Warm, Professional
   ===================================================== */

/* ---------- CSS Variables ---------- */
:root {
  /* Colors */
  --primary: #2c4a6b;          /* Deep Navy Blue */
  --primary-light: #3d6a99;    /* Lighter Blue */
  --primary-dark: #1a3047;     /* Darker Blue */
  --accent: #6b9ac4;           /* Soft Blue Accent */
  --accent-warm: #c4a06b;      /* Warm Gold Accent */
  --accent-glow: rgba(107, 154, 196, 0.15);
  
  --text-main: #2a2a3a;        /* Almost Black */
  --text-sub: #5a5a6a;         /* Gray */
  --text-light: #8a8a9a;       /* Light Gray */
  
  --bg-white: #ffffff;
  --bg-light: #fafbfc;         /* Very Light Gray */
  --bg-section: #f5f7f9;       /* Section Background */
  --bg-cream: #fdfcfa;         /* Warm Cream */
  
  --border: #e8eaed;
  --shadow: rgba(44, 74, 107, 0.06);
  --shadow-hover: rgba(44, 74, 107, 0.12);
  
  /* Typography - 明朝体 */
  --font-main: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --font-en: 'Cormorant Garamond', 'Noto Serif JP', serif;
  --font-accent: 'Poppins', sans-serif;
  
  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1100px;
  --border-radius: 8px;
  
  /* Transitions */
  --transition: all 0.3s ease;
  
  /* Dot Pattern */
  --dot-pattern: radial-gradient(circle, var(--accent) 1px, transparent 1px);
  --dot-size: 20px;
}

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

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

body {
  font-family: var(--font-main);
  color: var(--text-main);
  background: var(--bg-white);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul, ol {
  list-style: none;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-padding);
}

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

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.header__logo {
  font-family: var(--font-en);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.08em;
}

.header__logo span {
  color: var(--accent-warm);
}

.header__nav {
  display: flex;
  gap: 32px;
}

.header__nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  position: relative;
  padding: 4px 0;
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-warm);
  transition: var(--transition);
}

.header__nav a:hover::after,
.header__nav a.active::after {
  width: 100%;
}

/* Mobile Menu */
.header__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.header__menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

/* ---------- Hero Section with Video ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 72px;
  background: var(--primary-dark);
}

.hero__video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(26, 48, 71, 0.7) 0%,
    rgba(44, 74, 107, 0.5) 50%,
    rgba(26, 48, 71, 0.7) 100%
  );
  z-index: 2;
}

.hero__content {
  text-align: center;
  position: relative;
  z-index: 3;
  animation: fadeInUp 1s ease-out;
  color: var(--bg-white);
}

.hero__tagline {
  font-family: var(--font-accent);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-warm);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero__title {
  font-family: var(--font-main);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 24px;
  color: var(--bg-white);
  letter-spacing: 0.1em;
}

.hero__title span {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: rgba(255, 255, 255, 0.9);
  margin-top: 8px;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 2;
  letter-spacing: 0.05em;
}

.hero__cta {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ✅ 修正: サブページ用ヒーロー（header.jpg使用） */
.hero--simple {
  min-height: 40vh;
  background-color: var(--primary-dark);
  background-image: url('../images/header.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}

/* ✅ 追加: 文字を読みやすくするオーバーレイ */
.hero--simple::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 48, 71, 0.3);
  z-index: 1;
}

.hero--simple .hero__content {
  color: var(--bg-white);
  position: relative;
  z-index: 2;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn--primary {
  background: var(--primary);
  color: var(--bg-white);
  box-shadow: 0 4px 14px var(--shadow);
}

.btn--primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-hover);
  color: var(--bg-white);
}

.btn--outline {
  background: transparent;
  color: var(--bg-white);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--bg-white);
  color: var(--bg-white);
}

.btn--outline-dark {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn--outline-dark:hover {
  background: var(--primary);
  color: var(--bg-white);
}

/* ---------- Section Headers with Dot Accent ---------- */
.section__header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section__label {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-warm);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-main);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 16px;
  letter-spacing: 0.1em;
  position: relative;
  display: inline-block;
}

/* Subtle dot accent under title */
.section__title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 8px;
  background: var(--dot-pattern);
  background-size: 8px 8px;
  opacity: 0.3;
}

.section__desc {
  font-size: 1rem;
  color: var(--text-sub);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.9;
  letter-spacing: 0.03em;
}

/* ---------- Service Cards with Dot Accent ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.service-card {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 40px 32px;
  box-shadow: 0 4px 24px var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* Dot pattern accent on card header area */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: var(--dot-pattern);
  background-size: var(--dot-size) var(--dot-size);
  opacity: 0.08;
  transition: var(--transition);
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent-warm));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px var(--shadow-hover);
}

.service-card:hover::before {
  opacity: 0.15;
}

.service-card:hover::after {
  transform: scaleX(1);
}

.service-card__icon {
  width: 64px;
  height: 64px;
  background: var(--bg-section);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.75rem;
  position: relative;
  z-index: 1;
}

.service-card__title {
  font-family: var(--font-main);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-main);
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

.service-card__text {
  font-size: 0.95rem;
  color: var(--text-sub);
  line-height: 1.9;
  position: relative;
  z-index: 1;
}

/* ---------- Company Info ---------- */
.company-info {
  max-width: 800px;
  margin: 0 auto;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
}

.company-table tr {
  border-bottom: 1px solid var(--border);
}

.company-table th,
.company-table td {
  padding: 24px 16px;
  text-align: left;
  vertical-align: top;
}

.company-table th {
  width: 160px;
  font-family: var(--font-main);
  font-weight: 500;
  color: var(--primary);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.company-table td {
  color: var(--text-main);
  line-height: 1.9;
}

.company-table .note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 6px;
}

/* Representative Name SVG */
.representative-name {
  height: 1.5em;
  vertical-align: middle;
}

/* ---------- About / Profile ---------- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h3 {
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 24px;
  color: var(--text-main);
  letter-spacing: 0.08em;
}

.about-text p {
  margin-bottom: 20px;
  color: var(--text-sub);
  line-height: 2;
  letter-spacing: 0.03em;
}

/* ✅ 修正: accent.jpg を使用 */
.about-visual {
  background-image: url('../images/accent.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  padding: 48px;
  color: var(--bg-white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* ✅ 修正: ドットパターン→軽いオーバーレイで文字を読みやすく */
.about-visual::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 48, 71, 0.35);
  z-index: 0;
}

.about-visual__tagline {
  font-family: var(--font-en);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.about-visual__meaning {
  font-family: var(--font-main);
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 2;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
}

/* ---------- Contact Section ---------- */
.contact-box {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 60px;
  box-shadow: 0 8px 40px var(--shadow);
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle dot accent */
.contact-box::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: var(--dot-pattern);
  background-size: var(--dot-size) var(--dot-size);
  opacity: 0.05;
}

.contact-box__title {
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 24px;
  color: var(--text-main);
  letter-spacing: 0.08em;
}

.contact-box__text {
  margin-bottom: 32px;
  color: var(--text-sub);
  line-height: 2;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 24px;
  background: var(--bg-light);
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.contact-item__icon {
  font-size: 1.25rem;
}

.contact-item a {
  color: var(--primary);
  font-weight: 500;
}

.contact-item--line {
  background: #06c755;
  color: white;
}

.contact-item--line a {
  color: white;
}

/* ---------- Footer ---------- */
/* ✅ 修正: accent.jpg を使用 */
.footer {
  background-color: var(--primary-dark);
  background-image: url('../images/accent.jpg');
  background-size: cover;
  background-position: center;
  color: var(--bg-white);
  padding: 60px 0 30px;
  position: relative;
}

/* ✅ 追加: フッターにも軽いオーバーレイで統一感 */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 48, 71, 0.4);
  z-index: 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.footer__logo {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.08em;
}

.footer__logo span {
  color: var(--accent-warm);
}

.footer__address {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.9;
}

.footer__nav {
  display: flex;
  gap: 32px;
}

.footer__nav a {
  color: var(--bg-white);
  opacity: 0.8;
  font-size: 0.9rem;
}

.footer__nav a:hover {
  opacity: 1;
  color: var(--accent-warm);
}

.footer__copy {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  opacity: 0.6;
  position: relative;
  z-index: 1;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in--delay-1 { animation-delay: 0.1s; }
.fade-in--delay-2 { animation-delay: 0.2s; }
.fade-in--delay-3 { animation-delay: 0.3s; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }
  
  .header__nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px var(--shadow);
  }
  
  .header__nav.active {
    display: flex;
  }
  
  .header__menu-btn {
    display: flex;
  }
  
  .hero__title {
    font-size: 1.75rem;
  }
  
  .hero__cta {
    flex-direction: column;
    align-items: center;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .company-table th,
  .company-table td {
    display: block;
    padding: 12px 0;
  }
  
  .company-table th {
    width: 100%;
    padding-bottom: 4px;
  }
  
  .company-table tr {
    padding: 16px 0;
  }
  
  .contact-box {
    padding: 40px 24px;
  }
  
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
  
  .footer__nav {
    justify-content: center;
  }
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
