/* ============================================
   株式会社チャオ — Corporate Blue Design
   ============================================ */

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

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

:root {
  --c-bg: #ffffff;
  --c-text: #111111;
  --c-text-sub: #3a3a3a;
  --c-text-muted: #707070;
  --c-border: #e0e8f4;
  --c-surface: #f4f7fb;
  --c-surface-hover: #e8f0fa;

  /* Corporate Blue */
  --c-blue:       #1a6bb5;   /* primary */
  --c-blue-dark:  #0f4a8a;   /* hover / dark */
  --c-blue-deep:  #0a3060;   /* footer / hero */
  --c-blue-light: #e8f1fb;   /* tint */
  --c-accent:     #1a6bb5;

  --font-sans: 'Inter', 'Noto Sans JP', system-ui, sans-serif;
  --font-jp: 'Noto Sans JP', 'Hiragino Sans', sans-serif;

  --max-w: 1080px;
  --gap: clamp(16px, 4vw, 40px);
  --section-gap: clamp(64px, 10vw, 120px);
}

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

body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5 {
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.label-en {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  font-weight: 400;
}

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

section {
  padding: var(--section-gap) 0;
}

/* ----- Header / Nav ----- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}

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

.logo {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--c-text);
  text-decoration: none;
  line-height: 1.15;
  display: inline-flex;
  flex-direction: column;
}
.logo-sub {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  opacity: 0.9;
}

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

nav a {
  font-size: 13px;
  color: var(--c-text-sub);
  text-decoration: none;
  transition: color 0.15s;
}

nav a:hover {
  color: var(--c-text);
}

nav a.btn-contact {
  border: 1px solid var(--c-blue);
  padding: 6px 16px;
  border-radius: 2px;
  color: var(--c-blue);
  font-size: 12px;
}

nav a.btn-contact:hover {
  background: var(--c-blue);
  color: var(--c-bg);
}

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

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

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--c-text);
  transition: transform 0.2s, opacity 0.2s;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding: 20px var(--gap);
  gap: 16px;
}

.mobile-nav a {
  font-size: 15px;
  color: var(--c-text);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid var(--c-border);
}

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

/* ----- Hero ----- */
.hero {
  padding: clamp(80px, 14vw, 160px) 0 clamp(60px, 10vw, 120px);
  border-bottom: 1px solid var(--c-border);
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300;
  line-height: 1.2;
  max-width: 640px;
  word-break: keep-all;
}

.hero-sub {
  margin-top: 24px;
  font-size: 15px;
  color: var(--c-text-sub);
  white-space: nowrap;
  line-height: 1.8;
}

.hero-cta {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 13px;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--c-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--c-blue-dark);
}

.btn-secondary {
  border: 1px solid var(--c-blue);
  color: var(--c-blue);
}

.btn-secondary:hover {
  background: var(--c-blue-light);
}

/* ----- Section Header ----- */
.section-header {
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400;
  margin-top: 8px;
}

/* ----- News List ----- */
.news-list {
  list-style: none;
}

.news-list li {
  border-top: 1px solid var(--c-border);
}

.news-list li:last-child {
  border-bottom: 1px solid var(--c-border);
}

.news-list a {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 18px 0;
  text-decoration: none;
  color: var(--c-text);
  transition: background 0.1s;
}

.news-list a:hover {
  color: var(--c-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-date {
  font-size: 12px;
  color: var(--c-text-muted);
  white-space: nowrap;
  min-width: 96px;
  font-variant-numeric: tabular-nums;
}

.news-title {
  font-size: 15px;
  line-height: 1.7;
}

/* ----- Service Cards ----- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
}

.service-card {
  background: var(--c-bg);
  padding: 36px 32px;
  text-decoration: none;
  color: var(--c-text);
  transition: background 0.15s;
}

.service-card:hover {
  background: var(--c-surface);
}


.service-card h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  color: var(--c-text-sub);
  line-height: 1.85;
}

/* ----- Tech List ----- */
.tech-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.tech-item {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--c-border);
}

.tech-item:first-child {
  padding-top: 0;
  border-top: none;
}



.tech-body p {
  font-size: 15px;
  color: var(--c-text-sub);
  line-height: 1.9;
}

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--c-blue);
  color: #fff;
  padding: 4px 12px;
  border-radius: 3px;
  margin-top: 10px;
  vertical-align: middle;
  white-space: nowrap;
}

/* ----- Introduction / Cases ----- */
.case-list {
  display: grid;
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
}

.case-item {
  background: var(--c-bg);
  padding: 36px 32px;
}

/* 2-column layout when media is present */
.case-item--media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 40px 32px;
}

@media (max-width: 768px) {
  .case-item--media {
    grid-template-columns: 1fr;
  }
}

/* Gallery (Case 01) */
.case-gallery-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.case-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 4px;
}

.case-gallery-thumbs img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s;
}

.case-gallery-thumbs img.active,
.case-gallery-thumbs img:hover {
  opacity: 1;
  outline: 2px solid var(--c-blue);
  outline-offset: -2px;
}

/* Logo / GIF image (Case 02, 03) */
.case-media-img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--c-border);
}


.case-tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-blue);
  margin-bottom: 8px;
}

.case-item h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 12px;
}

.case-item p {
  font-size: 14px;
  color: var(--c-text-sub);
  line-height: 1.9;
}

.client-list {
  margin-top: 48px;
}

.client-group {
  border-top: 1px solid var(--c-border);
  padding: 20px 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
}

.client-group:last-child {
  border-bottom: 1px solid var(--c-border);
}

.client-industry {
  font-size: 12px;
  color: var(--c-text-muted);
  font-weight: 500;
  padding-top: 2px;
}

.client-names {
  font-size: 13px;
  color: var(--c-text-sub);
  line-height: 1.8;
}

/* ----- About ----- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.message-block blockquote {
  font-size: 14px;
  color: var(--c-text-sub);
  line-height: 2;
  font-style: normal;
  border-left: 2px solid var(--c-border);
  padding-left: 24px;
  margin-top: 16px;
}

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

.info-table th,
.info-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--c-border);
  font-size: 14px;
  vertical-align: top;
  text-align: left;
}

.info-table th {
  color: var(--c-text-muted);
  font-weight: 400;
  width: 120px;
  padding-right: 24px;
}

/* ----- Patent Table ----- */

.patent-group {
  margin-bottom: 40px;
}

.patent-group h4 {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--c-text-sub);
}

.patent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.patent-table th {
  text-align: left;
  padding: 8px 16px 8px 0;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-weight: 400;
}

.patent-table td {
  padding: 8px 16px 8px 0;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-sub);
}

/* ----- Officers ----- */
.officer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  margin-top: 24px;
}

.officer-item {
  background: var(--c-bg);
  padding: 24px;
}

.officer-title {
  font-size: 11px;
  color: var(--c-blue);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.officer-name-ja {
  font-size: 16px;
  font-weight: 500;
}

.officer-name-en {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-top: 4px;
}

/* ----- Recruit ----- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
}

.benefit-item {
  background: var(--c-bg);
  padding: 28px 24px;
  text-align: center;
}

.benefit-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 16px;
}

.benefit-item h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--c-blue);
}

.benefit-item p {
  font-size: 13px;
  color: var(--c-text-sub);
  line-height: 1.7;
  text-align: left;
}

/* Tech logo grid */
.tech-logos {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 36px 24px;
  margin-top: 16px;
  align-items: center;
}

.tech-logos img {
  height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  justify-self: center;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.tech-logos img:hover {
  opacity: 1;
}

@media (max-width: 640px) {
  .tech-logos {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 16px;
  }
  .tech-logos img {
    height: 44px;
  }
}


.job-list {
  margin-top: 48px;
  display: grid;
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
}

.job-item {
  background: var(--c-bg);
}

.job-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.job-summary::-webkit-details-marker {
  display: none;
}

.job-summary h3 {
  font-size: 15px;
  font-weight: 400;
}

.job-arrow {
  font-size: 18px;
  color: var(--c-blue);
  transition: transform 0.2s;
}

details[open] .job-arrow {
  transform: rotate(45deg);
}

.job-detail {
  padding: 0 32px 32px;
  border-top: 1px solid var(--c-border);
}

.job-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 20px;
}

.job-table th,
.job-table td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
  text-align: left;
}

.job-table th {
  color: var(--c-text-muted);
  font-weight: 400;
  width: 100px;
  white-space: nowrap;
}

.job-table td {
  color: var(--c-text-sub);
  line-height: 1.7;
}

/* ----- Footer ----- */
footer {
  background: var(--c-blue-deep);
  padding: 48px 0 32px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
}

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

.footer-nav a {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

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

.footer-copy {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 32px;
  grid-column: 1 / -1;
}

/* ----- Hero Image ----- */
.hero-img {
  position: relative;
  background-color: var(--c-blue-deep);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,48,96,0.88) 0%, rgba(26,107,181,0.72) 100%);
  z-index: 1;
}

.hero-img .hero-inner {
  position: relative;
  z-index: 2;
}

.hero-img .hero-eyebrow { color: rgba(255,255,255,0.65); }
.hero-img h1 { color: #fff; }
.hero-img .hero-sub { color: rgba(255,255,255,0.8); }

/* ----- Service Card with Image ----- */
.service-card-img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
}

.service-card-img-wrap {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--c-blue-light);
}

.service-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.service-card:hover .service-card-img-wrap img {
  transform: scale(1.04);
}

/* ----- Page Hero with Image ----- */
.page-hero-img {
  position: relative;
  background: var(--c-blue-deep);
  background-size: cover;
  background-position: center;
}

.page-hero-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10,48,96,0.75);
}

.page-hero-img .page-hero-inner {
  position: relative;
  z-index: 1;
}

.page-hero-img .label-en { color: rgba(255,255,255,0.6); }
.page-hero-img h1, .page-hero-img h2 { color: #fff; }
.page-hero-img p { color: rgba(255,255,255,0.75); }

/* ----- Blue accent border on section headers ----- */
.section-header .label-en {
  color: var(--c-blue);
}

/* badge は上部の定義で完結 */

/* ----- Image with caption block ----- */
.img-block {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--c-surface);
}

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

/* ----- CEO photo ----- */
.ceo-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--c-blue-light);
  margin-bottom: 16px;
}


/* ----- Page Hero ----- */
.page-hero {
  padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--c-border);
}

.page-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.page-hero h1, .page-hero h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 300;
  margin-top: 8px;
}

/* ----- Link Row ----- */
.link-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 24px;
}

.link-more {
  font-size: 12px;
  color: var(--c-blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.link-more::after {
  content: '→';
}

.link-more:hover {
  color: var(--c-blue-dark);
}

/* ----- Utility ----- */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }

.text-muted { color: var(--c-text-muted); }

/* ----- Responsive ----- */
@media (max-width: 768px) {
  nav .nav-links {
    display: none;
  }
  .hero h1 {
    font-size: clamp(24px, 7vw, 32px);
    word-break: break-all;
  }

  .hero-sub {
    font-size: 14px;
    white-space: normal;
  }


  .menu-toggle {
    display: flex;
  }

  .tech-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .client-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .job-summary {
    padding: 20px;
  }

  .job-detail {
    padding: 0 20px 24px;
  }

  .case-gallery-thumbs {
    grid-template-columns: repeat(2, 1fr);
  }
}
