/* ============================================================
   合同会社C2O — TOPページ
   Navy #003070 / Gold #F0C000 / Cinematic tone
   ============================================================ */

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

:root {
  --navy:       #003070;
  --navy-dark:  #001f4d;
  --gold:       #F0C000;
  --gold-dark:  #c9a000;
  --white:      #ffffff;
  --off:        #f5f4f0;
  --text:       #1a1a1a;
  --muted:      #666666;
  --border:     #e0ddd6;
  --overlay:    rgba(0, 0, 0, 0.45);

  --font: 'Noto Sans JP', sans-serif;
  --max-w: 1080px;
  --header-h: 72px;
  --section-py: 100px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.25s var(--ease);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

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

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

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 32px;
}

.section { padding-block: var(--section-py); }
.section--dark { background: var(--navy-dark); color: var(--white); }
.section--off { background: var(--off); }

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: 0.06em;
  margin-bottom: 48px;
}

/* News — compact height */
.news.section {
  padding-block: 48px 56px;
}

.news__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: var(--navy);
  margin-bottom: 24px;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.section-heading-ja {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-top: -12px;
  margin-bottom: 48px;
  line-height: 1.35;
}

.section-label + .section-heading-ja {
  margin-top: -12px;
}

.products .section-label,
.about .section-label,
.portfolio .section-label,
.services .section-label {
  margin-bottom: 12px;
}

.section-en {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.section-en--light {
  color: rgba(255, 255, 255, 0.72);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

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

.btn--inverse {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--navy);
}
.btn--inverse:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: var(--gold);
}

.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn--outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn--full { width: 100%; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.header.is-scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.header__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 32px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.header__logo,
.footer__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header__logo img,
.footer__logo .site-logo,
.site-logo {
  display: block;
  width: auto;
  max-width: none;
  object-fit: contain;
}

.site-logo--full {
  height: clamp(36px, 4.5vw, 44px);
  width: auto;
  max-width: min(300px, 46vw);
}

.footer__logo .site-logo--full {
  height: clamp(40px, 5vw, 48px);
  max-width: min(340px, 52vw);
}

.header--solid {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.header__nav { margin-left: auto; }

.header__nav-list {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
  white-space: nowrap;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--navy); }
.nav-link--current { color: var(--navy); font-weight: 700; }

.header__cta { flex-shrink: 0; }

.header__company-link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text);
  flex-shrink: 0;
  white-space: nowrap;
  transition: color var(--transition);
}
.header__company-link:hover { color: var(--navy); }
.header__company-link--current {
  color: var(--navy);
  font-weight: 700;
}

.header__nav-mobile { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO（現行ビジュアルを維持）
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  margin-top: calc(-1 * var(--header-h));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  z-index: 1;
}

.hero__content {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 60px;
  padding-inline: 32px;
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
}

.hero__tagline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.hero__tagline-line {
  display: none;
  background: var(--white);
  color: var(--text);
  font-size: clamp(24px, 4.5vw, 48px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.04em;
  padding: 12px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  min-height: 1.25em;
}

.hero__tagline-line:has(.hero__typewriter:not(:empty)) {
  display: inline-block;
}

.hero__typewriter.is-typing::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 0.85em;
  margin-left: 4px;
  vertical-align: -0.08em;
  background: var(--text);
  animation: hero-cursor-blink 0.7s step-end infinite;
}

@keyframes hero-cursor-blink {
  50% { opacity: 0; }
}

/* ============================================================
   NEWS
   ============================================================ */
.news__list {
  border-top: 1px solid var(--border);
}

.news__item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.news__date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 96px;
}

.news__text { color: var(--text); }

/* ============================================================
   MESSAGE
   ============================================================ */
.message.section {
  padding-block: 128px 144px;
}

.message__lead {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}

.message__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.85;
}

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

.products__card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  transition: box-shadow var(--transition), transform var(--transition);
}
.products__card:hover {
  box-shadow: 0 8px 28px rgba(0, 48, 112, 0.08);
  transform: translateY(-2px);
}

.products__icon {
  display: flex;
  color: var(--navy);
  margin-bottom: 16px;
}

.products__title-en {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 6px;
}

.products__title-ja {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 14px;
}

.products__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.85;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about__cta {
  margin-top: 48px;
  margin-bottom: 16px;
  text-align: center;
}

.about__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.about__card-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
}

.about__card-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio__lead {
  font-size: 15px;
  color: var(--muted);
  margin-top: -32px;
  margin-bottom: 40px;
  line-height: 1.85;
}

.services .section-heading-ja {
  margin-bottom: 28px;
}

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.portfolio__card {
  border-radius: 6px;
  overflow: hidden;
  background: var(--navy-dark);
  transition: box-shadow var(--transition), transform var(--transition);
}
.portfolio__card:hover {
  box-shadow: 0 16px 40px rgba(0, 48, 112, 0.18);
  transform: translateY(-4px);
}

.portfolio__link {
  display: block;
  color: inherit;
}

.portfolio__img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--off);
}

.portfolio__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s var(--ease);
}
.portfolio__card:hover .portfolio__img { transform: scale(1.05); }

.portfolio__overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 20px 18px 18px;
  background: linear-gradient(transparent, rgba(0, 15, 38, 0.88));
  color: var(--white);
}

.portfolio__name {
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.portfolio__desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.portfolio__cta { text-align: center; }

/* ============================================================
   OUR SERVICE
   ============================================================ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.services__card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.services__card:hover {
  box-shadow: 0 12px 36px rgba(0, 48, 112, 0.1);
  transform: translateY(-2px);
}

.services__link {
  display: block;
  height: 100%;
  color: inherit;
}

.services__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 28px 32px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.services__thumb--dark {
  background: #1a1d23;
}

.services__logo {
  max-height: 48px;
  width: auto;
  max-width: 200px;
  margin-inline: auto;
}

.services__body {
  padding: 24px 28px 28px;
}

.services__name {
  font-size: 20px;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 12px;
}

.services__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 16px;
}

.services__more {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
}

.services__card:hover .services__more { color: var(--gold-dark); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact__lead {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 12px;
}

.contact__note {
  font-size: 14px;
  color: var(--navy);
  font-weight: 500;
  margin-bottom: 40px;
  padding: 12px 16px;
  background: rgba(0, 48, 112, 0.06);
  border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0;
}

.contact__form {
  max-width: 560px;
  margin-inline: auto;
}

.form__group {
  margin-bottom: 24px;
}

.form__group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.form__required {
  font-size: 11px;
  color: var(--navy);
  margin-left: 4px;
}

.form__group input,
.form__group textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font);
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  transition: border-color var(--transition);
}
.form__group input:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--navy);
}

.form__group textarea { resize: vertical; min-height: 140px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}

.footer__nav a {
  font-size: 13px;
  color: var(--muted);
  transition: color var(--transition);
}
.footer__nav a:hover,
.footer__nav a[aria-current="page"] {
  color: var(--navy);
}

.footer__logo .site-logo {
  opacity: 1;
}

.footer__copy {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   FADE IN
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   SUB PAGES
   ============================================================ */
.page-sub .page-main {
  padding-top: var(--header-h);
}

.page-hero {
  background: var(--navy-dark);
  color: var(--white);
  padding: 56px 0 48px;
}

.page-hero__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.page-section {
  padding-block: 72px 96px;
}

.container--narrow {
  max-width: 760px;
}

.page-heading {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 24px;
  line-height: 1.45;
}

.page-prose {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.95;
  margin-bottom: 48px;
}

.company-table-wrap {
  overflow-x: auto;
  margin-bottom: 48px;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.company-table th,
.company-table td {
  padding: 16px 20px;
  border: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
  line-height: 1.85;
}

.company-table th {
  width: 28%;
  min-width: 120px;
  background: var(--off);
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

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

.company-table td a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.company-table__list {
  list-style: disc;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-cta {
  text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 769px) {
  .message__lead {
    white-space: nowrap;
  }

  .portfolio__lead {
    white-space: nowrap;
  }

  .page-heading {
    white-space: nowrap;
  }
}

@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .portfolio__grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .products__grid { grid-template-columns: 1fr; }
  .services__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --section-py: 72px; }

  .site-logo--full {
    height: 34px;
    max-width: min(240px, 58vw);
  }

  .footer__logo .site-logo--full {
    height: 38px;
    max-width: min(260px, 72vw);
  }

  .header__company-link { display: none; }
  .header__nav-mobile { display: list-item; }

  .header__nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 24px 32px 32px;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }
  .header__nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .header__cta { display: none; }
  .hamburger { display: flex; }

  .hero__tagline-line {
    padding: 10px 18px;
    font-size: clamp(20px, 5.5vw, 32px);
  }

  .message.section {
    padding-block: 80px 96px;
  }

  .news__item { flex-direction: column; gap: 4px; }
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
