/* ========================================
   HCS R&D株式会社 コーポレートサイト
   メインスタイルシート
======================================== */

/* ---- Variables ---- */
:root {
  --navy: #0a1628;
  --navy-mid: #0f2040;
  --navy-light: #1b3a6b;
  --gold: #c9a84c;
  --gold-light: #e0c068;
  --white: #ffffff;
  --off-white: #f5f3ef;
  --gray-light: #f0eeea;
  --gray: #888;
  --text: #1a1a1a;
  --font-en: 'Cormorant Garamond', Georgia, serif;
  --font-ja: 'Noto Serif JP', 'YuMincho', serif;
  --font-sans: 'Noto Sans JP', sans-serif;
  --transition: all 0.4s ease;
  --shadow: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.18);
}

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

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

body {
  font-family: var(--font-ja);
  color: var(--text);
  background: var(--white);
  line-height: 1.8;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* フォント崩れ防止: 数字・英数字を明示的にCormorant Garamondへ */
.stat-big,
.ach-big,
.stat-num,
.solution-num,
.flow-num {
  font-family: var(--font-en) !important;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}

/* ---- Container ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201,168,76,0.3);
  transition: var(--transition);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-en {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.logo-ja {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.04em;
}

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

.nav-links a {
  font-family: var(--font-ja);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  transition: var(--transition);
  letter-spacing: 0.04em;
}

.nav-links a:hover { color: var(--gold); }

.btn-nav {
  padding: 8px 20px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  color: var(--gold) !important;
  font-size: 0.78rem !important;
  transition: var(--transition);
}

.btn-nav:hover {
  background: var(--gold);
  color: var(--navy) !important;
}

/* ---- Hamburger ---- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}

/* ---- Mobile Nav ---- */
.mobile-nav {
  display: none;
  position: fixed;
  top: 70px; left: 0; right: 0;
  background: var(--navy);
  z-index: 99;
  border-bottom: 1px solid rgba(201,168,76,0.3);
}

.mobile-nav.open { display: block; }

.mobile-nav ul {
  list-style: none;
  padding: 16px 0;
}

.mobile-nav li a {
  display: block;
  padding: 14px 32px;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: var(--transition);
}

.mobile-nav li a:hover {
  color: var(--gold);
  background: rgba(201,168,76,0.06);
}

/* ---- Hero ---- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(10,22,40,0.88) 0%, rgba(10,22,40,0.72) 100%),
    url('https://images.unsplash.com/photo-1540959733332-eab4deabeeaf?w=1600&q=80&auto=format') center/cover no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,22,40,0.5) 0%, rgba(10,22,40,0.75) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  text-align: center;
}

.hero-label {
  font-family: var(--font-en);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-ja);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 500;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 28px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.hero-sub {
  font-size: clamp(0.88rem, 1.8vw, 1.05rem);
  color: rgba(255,255,255,0.9);
  line-height: 1.9;
  margin-bottom: 36px;
  font-weight: 300;
}

/* ---- Waiting Banner ---- */
.waiting-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.5);
  border-radius: 4px;
  padding: 14px 20px;
  margin: 0 auto 36px;
  max-width: 700px;
  text-align: left;
}

.waiting-banner i {
  color: var(--gold);
  font-size: 1rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.waiting-banner p {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
}

/* ---- Hero Stats ---- */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.stat-num {
  font-family: var(--font-en);
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.stat-big {
  font-family: var(--font-en) !important;
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
  display: inline-block;
}

.stat-unit {
  font-family: var(--font-ja) !important;
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
}

.stat-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.06em;
}

/* ---- Buttons ---- */
.btn-hero {
  display: inline-block;
  padding: 16px 48px;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-ja);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  border-radius: 2px;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(201,168,76,0.35);
}

.btn-hero:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,168,76,0.45);
}

/* ---- Sections ---- */
.section-light { background: var(--off-white); padding: 100px 0; }
.section-dark  { background: var(--navy); padding: 100px 0; }
.section-navy  { background: var(--navy-mid); padding: 100px 0; }

/* ---- Section Header ---- */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  font-family: var(--font-en);
  font-size: 0.82rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-ja);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 16px;
  line-height: 1.4;
}

.section-dark .section-title,
.section-navy .section-title { color: var(--white); }

.title-line {
  width: 40px;
  height: 2px;
  background: var(--navy);
  margin: 0 auto 20px;
}
.title-line.gold { background: var(--gold); }

.section-desc {
  color: var(--gray);
  font-size: 0.9rem;
  line-height: 1.9;
  text-align: center;
}

/* ---- About ---- */
.about-lead {
  text-align: center;
  margin-bottom: 56px;
}

.about-lead p {
  font-size: 0.98rem;
  line-height: 2;
  color: #444;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: 4px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.card-icon i { color: var(--gold); font-size: 1.1rem; }

.feature-card h3 {
  font-family: var(--font-ja);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--navy);
}

.feature-card p {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.8;
}

/* ---- Solutions ---- */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.solution-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 4px;
  padding: 36px 24px;
  transition: var(--transition);
}

.solution-card:hover {
  background: rgba(201,168,76,0.08);
  border-color: var(--gold);
  transform: translateY(-4px);
}

.solution-num {
  font-family: var(--font-en) !important;
  font-size: 2.8rem;
  font-weight: 300;
  color: rgba(201,168,76,0.4);
  line-height: 1;
  margin-bottom: 12px;
}

.solution-card h3 {
  font-family: var(--font-ja);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
  line-height: 1.5;
}

.solution-sub {
  font-family: var(--font-en);
  font-size: 0.76rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.solution-card > p:last-of-type {
  font-size: 0.86rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.8;
  margin-bottom: 16px;
}

.solution-list {
  list-style: none;
  padding: 0;
}

.solution-list li {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-left: 14px;
  position: relative;
}

.solution-list li::before {
  content: '─';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.7rem;
}

/* ---- Service Flow ---- */
.flow-steps {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.flow-step {
  flex: 1;
  min-width: 140px;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.flow-num {
  font-family: var(--font-en) !important;
  font-size: 2rem;
  font-weight: 300;
  color: var(--gold);
  width: 56px;
  height: 56px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.flow-content h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.flow-content p {
  font-size: 0.78rem;
  color: #666;
  line-height: 1.6;
}

.flow-arrow {
  color: var(--gold);
  font-size: 0.9rem;
  padding-top: 20px;
  flex-shrink: 0;
}

/* ---- Achievements ---- */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.achievement-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 4px;
  padding: 40px 24px;
  text-align: center;
  transition: var(--transition);
}

.achievement-card:hover {
  background: rgba(201,168,76,0.08);
  border-color: var(--gold);
}

.ach-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  line-height: 1.5;
}

.ach-num {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ach-big {
  font-family: var(--font-en) !important;
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
}

.ach-unit {
  font-family: var(--font-ja) !important;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.7);
}

.ach-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

/* ---- Representative Message ---- */
.message-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  align-items: start;
}

.message-photo img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  object-position: top center;
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
}

.photo-caption {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding: 14px 20px;
  font-size: 0.8rem;
  border-radius: 0 0 4px 4px;
  line-height: 1.6;
}

.caption-title {
  font-weight: 500;
  color: var(--gold) !important;
  margin-top: 2px;
}

.message-lead {
  font-family: var(--font-ja);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.7;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(201,168,76,0.3);
}

.message-text p {
  font-size: 0.9rem;
  color: #444;
  line-height: 2;
  margin-bottom: 16px;
}

.message-sig {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(10,22,40,0.15);
  font-size: 0.85rem;
  color: #666;
  line-height: 1.7;
}

.sig-title {
  font-weight: 600;
  color: var(--navy);
  font-size: 1rem;
}

/* ---- Company Profile Table ---- */
.profile-table {
  max-width: 800px;
  margin: 0 auto;
}

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

.profile-table th,
.profile-table td {
  padding: 18px 24px;
  font-size: 0.88rem;
  line-height: 1.7;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.profile-table th {
  width: 180px;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.04em;
  vertical-align: top;
  white-space: nowrap;
}

.profile-table td {
  color: rgba(255,255,255,0.85);
}

/* ---- Group Companies ---- */
.group-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.group-card {
  background: var(--white);
  border-radius: 4px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border-left: 3px solid #ccc;
  transition: var(--transition);
  position: relative;
}

.group-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.group-card.highlight { border-left-color: var(--gold); }
.group-card.current { border-left-color: var(--gold); background: #fffdf5; }

.group-icon {
  width: 40px;
  height: 40px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.group-icon i { color: var(--gold); font-size: 0.95rem; }

.group-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  line-height: 1.5;
}

.group-rep {
  font-size: 0.78rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.group-card p:last-of-type {
  font-size: 0.78rem;
  color: #666;
  line-height: 1.7;
}

.current-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 0.06em;
}

/* ---- Contact ---- */
.contact-box {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.waiting-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 4px;
  padding: 16px 24px;
  margin-bottom: 28px;
  text-align: left;
}

.waiting-notice i {
  color: var(--gold);
  font-size: 1rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.waiting-notice p {
  font-size: 0.86rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
}

.contact-lead {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.9;
  margin-bottom: 36px;
}

.btn-contact {
  display: inline-block;
  padding: 18px 56px;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-ja);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 2px;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(201,168,76,0.3);
}

.btn-contact:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,168,76,0.4);
}

/* ---- Footer ---- */
#footer {
  background: var(--navy);
  border-top: 1px solid rgba(201,168,76,0.3);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 32px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-logo .logo-en {
  font-family: var(--font-en);
  font-size: 1.4rem;
  color: var(--gold);
  display: block;
  margin-bottom: 4px;
}

.footer-logo .logo-ja {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.5);
}

.footer-info p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.footer-links a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  transition: var(--transition);
}

.footer-links a:hover { color: var(--gold); }

.footer-copy {
  text-align: center;
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-copy p {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
}

/* ---- Floating CTA ---- */
.floating-cta {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--gold);
  color: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 4px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 90;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  pointer-events: none;
}

.floating-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.floating-cta:hover {
  background: var(--gold-light);
  transform: translateY(-3px);
}

.floating-cta i { font-size: 1.2rem; }

/* ---- Reveal Animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Utility ---- */
.pc-only { display: inline; }

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 1024px) {
  .solutions-grid { grid-template-columns: 1fr; }
  .group-grid { grid-template-columns: repeat(2, 1fr); }
  .message-layout { grid-template-columns: 1fr; }
  .message-photo img { height: 380px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-links { align-items: flex-start; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .pc-only { display: none; }

  #hero { min-height: auto; }
  .hero-content { padding: 100px 20px 60px; }
  .hero-title { font-size: 1.8rem; }
  .hero-sub { font-size: 0.85rem; }
  .hero-stats { gap: 24px; }

  .card-grid { grid-template-columns: 1fr; }
  .achievements-grid { grid-template-columns: 1fr; gap: 20px; }
  .group-grid { grid-template-columns: 1fr; }

  .flow-steps {
    flex-direction: column;
    align-items: center;
  }
  .flow-arrow { transform: rotate(90deg); padding-top: 0; }
  .flow-step { max-width: 100%; min-width: 0; width: 100%; }

  .message-layout { grid-template-columns: 1fr; gap: 32px; }
  .message-photo img { height: 320px; }

  .profile-table th { width: 110px; }
  .profile-table th,
  .profile-table td { padding: 14px 16px; }

  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-links { align-items: flex-start; }

  .floating-cta { bottom: 20px; right: 20px; }

  .section-light,
  .section-dark,
  .section-navy { padding: 72px 0; }

  .section-header { margin-bottom: 40px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.5rem; }
  .stat-big { font-size: 2rem; }
  .ach-big { font-size: 2.8rem; }
}
