/* ============================================
   株式会社Blue コーポレートサイト
   Design Tokens & Base Styles
   ============================================ */

:root {
  /* Colors */
  --color-primary: #3d5a80;
  --color-primary-dark: #2c4460;
  --color-primary-light: #e8eef4;
  --color-accent: #4a7c8f;
  --color-bg: #ffffff;
  --color-bg-gray: #f6f7f9;
  --color-bg-cta: #f0f4f8;
  --color-text: #333840;
  --color-text-light: #6b7280;
  --color-text-muted: #9ca3af;
  --color-border: #e5e7eb;
  --color-border-light: #f0f1f3;
  --color-white: #ffffff;

  /* Typography */
  --font-base: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  --font-logo: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* Sizing */
  --container-max: 1080px;
  --container-narrow: 760px;
  --header-height: 64px;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Shadow */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);

  /* Transition */
  --transition: 0.2s ease;
}

/* ============================================
   Reset & Base
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

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

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

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

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

ul, ol {
  list-style: none;
}

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

/* ============================================
   Layout
   ============================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ============================================
   Header
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border-light);
  height: var(--header-height);
}

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

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-text {
  font-family: var(--font-logo);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.04em;
}

/* Nav */
.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-link {
  font-size: 0.85rem;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-xs) 0;
  transition: color var(--transition);
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link--cta {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.45rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.nav-link--cta:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ============================================
   Hero
   ============================================ */

.hero {
  padding: var(--space-2xl) 0;
  background: linear-gradient(170deg, var(--color-bg) 0%, var(--color-primary-light) 100%);
  text-align: center;
}

.hero-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  letter-spacing: 0.02em;
}

.hero-sub {
  font-size: clamp(0.88rem, 1.5vw, 1rem);
  color: var(--color-text-light);
  line-height: 1.9;
  margin-bottom: var(--space-lg);
}

.hero-cta {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-visual {
  margin: var(--space-lg) auto 0;
  max-width: 860px;
}

.hero-visual-img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(61, 90, 128, 0.12);
}

/* Page Hero (sub pages) */
.page-hero {
  padding: var(--space-xl) 0 var(--space-lg);
  background: linear-gradient(170deg, var(--color-bg) 0%, var(--color-primary-light) 100%);
  text-align: center;
}

.page-hero--sm {
  padding: var(--space-lg) 0;
}

.page-hero-label {
  font-family: var(--font-logo);
  font-size: 0.8rem;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.page-hero-title {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.page-hero-sub {
  font-size: clamp(0.88rem, 1.5vw, 1rem);
  color: var(--color-text-light);
  line-height: 1.9;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.8rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

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

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

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

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

.btn--lg {
  padding: 0.9rem 2.4rem;
  font-size: 1rem;
}

/* ============================================
   Sections
   ============================================ */

.section {
  padding: var(--space-2xl) 0;
}

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

.section--cta {
  background: var(--color-bg-cta);
  text-align: center;
}

.section--note {
  padding: var(--space-lg) 0;
}

.section-title {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.section-lead {
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.92rem;
  margin-bottom: var(--space-xl);
  line-height: 1.9;
}

/* ============================================
   Card Grid (Services)
   ============================================ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.card-grid--narrow {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-icon {
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.card-text {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* ============================================
   Strengths
   ============================================ */

.strengths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
}

.strength {
  padding: var(--space-lg);
}

.strength-num {
  font-family: var(--font-logo);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: var(--space-xs);
}

.strength-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  line-height: 1.6;
  color: var(--color-text);
}

.strength-text {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* ============================================
   Cases (ご相談テーマ例)
   ============================================ */

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.case-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: box-shadow var(--transition);
}

.case-card:hover {
  box-shadow: var(--shadow-md);
}

.case-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-primary-light);
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  margin-bottom: var(--space-xs);
}

.case-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  line-height: 1.6;
  color: var(--color-text);
}

.case-text {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* ============================================
   Flow (進め方)
   ============================================ */

.flow-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.flow-step {
  flex: 1;
  min-width: 180px;
  max-width: 240px;
  text-align: center;
  padding: var(--space-md);
}

.flow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-logo);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: var(--space-sm);
}

.flow-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.flow-text {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

.flow-arrow {
  display: flex;
  align-items: center;
  padding-top: 2.2rem;
}

.flow-arrow::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-border);
  position: relative;
}

/* ============================================
   FAQ
   ============================================ */

.faq-list {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  line-height: 1.6;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin-left: var(--space-sm);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item[open] .faq-question::after {
  content: "-";
}

.faq-answer {
  padding: 0 0 var(--space-md);
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* ============================================
   Company Table
   ============================================ */

.company-table-wrap {
  max-width: var(--container-narrow);
  margin: var(--space-lg) auto 0;
}

.company-table th,
.company-table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.company-table th {
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  width: 130px;
}

.company-table td {
  color: var(--color-text-light);
}

/* ============================================
   Contact
   ============================================ */

.contact-actions {
  margin-bottom: var(--space-sm);
}

.contact-note {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* ============================================
   Genomics - Intro & Check List
   ============================================ */

.genomics-intro {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.genomics-intro p {
  font-size: 0.93rem;
  color: var(--color-text-light);
  line-height: 1.9;
  margin-bottom: var(--space-sm);
}

.check-list {
  max-width: var(--container-narrow);
  margin: var(--space-lg) auto 0;
}

.check-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: var(--space-sm);
  font-size: 0.93rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: rotate(-45deg);
}

/* Note box */
.note-box {
  background: var(--color-bg-gray);
  border-left: 3px solid var(--color-border);
  padding: var(--space-md) var(--space-lg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.note-box p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* ============================================
   Prose (Privacy Policy etc.)
   ============================================ */

.prose h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.prose p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.9;
  margin-bottom: var(--space-sm);
}

.prose ul {
  margin-bottom: var(--space-sm);
  padding-left: 1.2rem;
}

.prose ul li {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.9;
  position: relative;
  padding-left: 0.8rem;
  margin-bottom: 0.3rem;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

.prose-date {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: var(--space-lg);
}

/* ============================================
   Footer
   ============================================ */

.footer {
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.footer-brand .logo-text {
  color: var(--color-white);
  margin-bottom: var(--space-xs);
  display: block;
}

.footer-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-top: var(--space-xs);
}

.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
}

.footer-nav-list a {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-nav-list a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
}

.copyright {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {

  .sp-hide {
    display: none;
  }

  /* Header mobile */
  .menu-toggle {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }

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

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-xs) 0;
  }

  .nav-link {
    display: block;
    padding: 0.8rem var(--space-md);
    font-size: 0.9rem;
  }

  .nav-link--cta {
    margin: var(--space-xs) var(--space-md) var(--space-sm);
    text-align: center;
    border-radius: var(--radius-sm);
  }

  /* Menu toggle animation */
  .menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Hero */
  .hero {
    padding: var(--space-xl) 0;
  }

  .hero-visual {
    margin-top: var(--space-md);
  }

  /* Sections */
  .section {
    padding: var(--space-xl) 0;
  }

  /* Flow */
  .flow-grid {
    flex-direction: column;
    align-items: center;
  }

  .flow-step {
    max-width: 100%;
  }

  .flow-arrow {
    padding-top: 0;
    transform: rotate(90deg);
    padding: var(--space-xs) 0;
  }

  /* Cards */
  .card-grid {
    grid-template-columns: 1fr;
  }

  .cases-grid {
    grid-template-columns: 1fr;
  }

  .strengths-grid {
    grid-template-columns: 1fr;
  }

  /* Company table */
  .company-table th,
  .company-table td {
    display: block;
    width: 100%;
    padding: var(--space-xs) 0;
  }

  .company-table th {
    border-bottom: none;
    padding-bottom: 0;
    font-size: 0.82rem;
    color: var(--color-text-muted);
  }

  .company-table td {
    padding-top: 0.2rem;
  }

  .company-table tr {
    display: block;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .footer-nav-list {
    flex-direction: column;
    gap: var(--space-xs);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.4rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-visual {
    margin-top: var(--space-sm);
  }

  .btn--lg {
    width: 100%;
    max-width: 320px;
  }
}
