/* ============================================================
   ArcaZ Lab株式会社 コーポレートサイト
   白基調 + あいいろ（#165e83）アクセント
   ============================================================ */

:root {
  /* Colors */
  --color-primary: #165e83;
  --color-primary-dark: #0f4a68;
  --color-primary-pale: #eef5f8;
  --color-ink: #1a2b33;
  --color-text: #333c42;
  --color-text-muted: #5f6b72;
  --color-border: #d9e2e7;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f8fa;

  /* Typography */
  --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  --font-en: "Inter", "Noto Sans JP", sans-serif;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 760px;
  --header-height: 68px;

  /* Radius */
  --radius-btn: 6px;
  --radius-card: 8px;

  /* Shadow */
  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 2px rgba(26, 43, 51, 0.04), 0 8px 24px -12px rgba(26, 43, 51, 0.12);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

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

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

.section {
  padding: 96px 0;
}

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

.pc-only {
  display: inline;
}

/* ---------- Section headings ---------- */
.section-eyebrow {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-ink);
  margin-bottom: 16px;
}

.section-lead {
  color: var(--color-text-muted);
  margin-bottom: 48px;
  max-width: 720px;
}

.section-body {
  margin-bottom: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-sans);
  line-height: 1.5;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s cubic-bezier(0.22, 0.9, 0.32, 1);
  border: 1px solid transparent;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

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

.btn-outline {
  background: #ffffff;
  color: var(--color-primary);
  border-color: var(--color-border);
}

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

.btn-lg {
  padding: 14px 48px;
  font-size: 16px;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-ink);
}

.logo-img {
  height: 38px;
  width: auto;
  display: block;
}

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

.header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.2s ease;
}

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

.header-nav a.nav-contact {
  display: inline-block;
  padding: 8px 20px;
  background: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius-btn);
  font-weight: 700;
  transition: background-color 0.2s ease;
}

.header-nav a.nav-contact:hover {
  background: var(--color-primary-dark);
  color: #ffffff;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

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

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-height) + 96px) 0 72px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 500px at 85% 10%, var(--color-primary-pale) 0%, rgba(238, 245, 248, 0) 60%),
    linear-gradient(180deg, #ffffff 0%, #fafcfd 100%);
  z-index: -1;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(22, 94, 131, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(105deg, transparent 45%, rgba(0, 0, 0, 1) 100%);
  -webkit-mask-image: linear-gradient(105deg, transparent 45%, rgba(0, 0, 0, 1) 100%);
}

.hero-inner {
  position: relative;
}

.hero-eyebrow {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.hero-title {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--color-ink);
  margin-bottom: 24px;
}

.hero-lead {
  font-size: 16px;
  color: var(--color-text-muted);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Hero metrics（装飾的なライブ数値カード） */
.hero-metrics {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 72px;
}

.metric-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  box-shadow: var(--shadow-subtle);
}

.metric-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.metric-value {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  font-weight: 600;
  color: var(--color-ink);
  line-height: 1.2;
}

.metric-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-left: 4px;
}

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

.service-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  box-shadow: var(--shadow-subtle);
  transition: box-shadow 0.25s ease, transform 0.25s cubic-bezier(0.22, 0.9, 0.32, 1);
}

.service-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-card);
  background: var(--color-primary-pale);
  border: 1px solid #d3e4ec;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: 12px;
  line-height: 1.5;
}

.service-text {
  font-size: 14.5px;
  color: var(--color-text);
  margin-bottom: 16px;
}

.service-points {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}

.service-points li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.service-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}

/* ---------- Photobioreactor ---------- */
.pbr-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.pbr-figure {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
}

.pbr-figure img {
  width: 100%;
  height: auto;
}

.pbr-figure figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 12px;
}

/* ---------- Fields ---------- */
.field-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.field-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  box-shadow: var(--shadow-subtle);
}

.field-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-card);
  background: var(--color-primary-pale);
  border: 1px solid #d3e4ec;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.field-icon svg {
  width: 22px;
  height: 22px;
}

.field-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: 8px;
}

.field-card p {
  font-size: 13.5px;
  color: var(--color-text-muted);
}

/* ---------- Works ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.work-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-subtle);
}

.work-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-pale);
  border: 1px solid #d3e4ec;
  border-radius: 4px;
  padding: 2px 10px;
  margin-bottom: 12px;
}

.work-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: 8px;
  line-height: 1.5;
}

.work-card p {
  font-size: 14px;
  color: var(--color-text-muted);
}

.works-note {
  margin-top: 32px;
  background: var(--color-primary-pale);
  border: 1px solid #d3e4ec;
  border-radius: var(--radius-card);
  padding: 24px 28px;
}

.works-note p {
  font-size: 14.5px;
  color: var(--color-ink);
}

/* ---------- Company ---------- */
.company-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 40px;
}

.company-table th,
.company-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 20px 16px;
  text-align: left;
  vertical-align: top;
  font-size: 15px;
}

.company-table tr:first-child th,
.company-table tr:first-child td {
  border-top: 1px solid var(--color-border);
}

.company-table th {
  width: 160px;
  font-weight: 700;
  color: var(--color-ink);
  white-space: nowrap;
}

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

.company-map {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.company-map iframe {
  display: block;
}

/* ---------- Contact ---------- */
.section-contact {
  background: var(--color-bg-alt);
}

.contact-form {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 40px;
  box-shadow: var(--shadow-subtle);
}

.form-row {
  margin-bottom: 24px;
}

.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: 8px;
}

.required {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: var(--color-primary);
  border-radius: 4px;
  padding: 1px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(22, 94, 131, 0.12);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #a5b1b8;
}

.form-row textarea {
  resize: vertical;
}

/* honeypot: 画面外に隠す */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-bottom: 8px;
  font-size: 14px;
}

.form-status.is-success {
  background: #eef7f0;
  border: 1px solid #bfdec7;
  border-radius: var(--radius-btn);
  color: #1d5b2e;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.form-status.is-error {
  background: #fbeeee;
  border: 1px solid #e5b8b8;
  border-radius: var(--radius-btn);
  color: #8c2020;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.form-submit {
  text-align: center;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-ink);
  color: #ffffff;
  padding: 56px 0 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 48px;
}

.footer-logo {
  height: 52px;
  width: auto;
  display: block;
  /* 紺色ロゴをダーク背景用に白抜きにする */
  filter: brightness(0) invert(1);
  opacity: 0.95;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 13px;
  color: #b7c4cb;
  margin-top: 4px;
}

.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 13px;
  color: #d5dde1;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 12px;
  color: #9fadb4;
}

/* ---------- Fade-in animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.22, 0.9, 0.32, 1), transform 0.6s cubic-bezier(0.22, 0.9, 0.32, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover,
  .service-card:hover {
    transform: none;
  }
}

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

@media (max-width: 1024px) {
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }
  .field-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-title {
    font-size: 44px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .section-title {
    font-size: 26px;
  }

  .pc-only {
    display: none;
  }

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

  .header-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }

  .header-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .header-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
  }

  .header-nav li {
    border-top: 1px solid var(--color-bg-alt);
  }

  .header-nav li:first-child {
    border-top: none;
  }

  .header-nav a {
    display: block;
    padding: 14px 24px;
    font-size: 15px;
  }

  .header-nav a.nav-contact {
    margin: 12px 24px 8px;
    text-align: center;
  }

  /* Hero */
  .hero {
    padding: calc(var(--header-height) + 56px) 0 56px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 48px;
  }

  .metric-value {
    font-size: 22px;
  }

  /* Grids → 1 column */
  .service-grid,
  .field-grid,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .pbr-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Company table */
  .company-table th,
  .company-table td {
    display: block;
    width: 100%;
    padding: 12px 4px;
  }

  .company-table th {
    border-bottom: none;
    padding-bottom: 0;
    color: var(--color-primary);
    font-size: 13px;
  }

  .company-table tr:first-child td {
    border-top: none;
  }

  .contact-form {
    padding: 28px 20px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 28px;
  }
}
