/* ==========================================================================
   VYRON Corporate Site - base.css
   共通構造（レイアウト・セクション・レスポンシブ）
   配色・装飾は theme-a.css / theme-b.css のCSS変数で定義する
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 118px; /* 固定ヘッダー分 */
}

body {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* ---- 共通レイアウト ---- */
.container {
  width: min(1080px, 92%);
  margin-inline: auto;
}

section {
  padding: 96px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.section-en {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1.4;
}

.section-lead {
  max-width: 900px;
  margin: 20px auto 0;
  color: var(--color-text-muted);
  text-wrap: balance;
}

/* ---- ボタン ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 220px;
  padding: 16px 36px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.05em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  cursor: pointer;
}

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

.btn-primary {
  background: var(--gradient-accent);
  color: var(--color-btn-text);
  box-shadow: var(--shadow-btn);
}

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

/* ---- ヘッダー ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
}

/* 背景とblurは疑似要素に分離する。
   .header自体にbackdrop-filterを付けると、fixed配置の.gnav（ドロワー）の
   基準がヘッダーになり全画面に広がらなくなるため */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-header-bg);
  backdrop-filter: blur(12px);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 102px;
  transition: height 0.3s ease;
}

/* スクロール時はヘッダー・ロゴを縮小（is-scrolled は main.js で付与） */
.header.is-scrolled .header-inner {
  height: 64px;
}

.header.is-scrolled .logo img {
  height: 48px;
}

.logo {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.18em;
  color: var(--color-heading);
  display: flex;
  align-items: center;
}

.logo span {
  color: var(--color-accent);
}

/* ロゴ画像（透過PNG） */
.logo img {
  height: 90px;
  width: auto;
  display: block;
  transition: height 0.3s ease;
}

/* スマホ専用の改行（見出しの折り返し位置を制御） */
.br-sp {
  display: none;
}

.gnav ul {
  display: flex;
  gap: 36px;
}

.gnav a {
  font-family: "Outfit", "Noto Sans JP", sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--color-text);
  transition: color 0.2s;
}

.gnav a:hover {
  color: var(--color-accent);
}

.nav-contact-btn {
  min-width: 0;
  padding: 10px 24px;
  font-size: 13px;
}

.gnav .nav-contact-btn,
.gnav .nav-contact-btn:hover {
  color: var(--color-btn-text);
}

/* ハンバーガー（モバイル） */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  position: relative;
  cursor: pointer;
  z-index: 110;
}

.menu-toggle span {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 2px;
  background: var(--color-heading);
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 27px; }

.menu-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---- ヒーロー ---- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 160px 0 120px;
  overflow: hidden;
  background: var(--hero-bg);
}

/* 背景装飾（テーマ側で中身を定義） */
.hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--hero-deco);
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--hero-grid);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 85%);
}

/* キービジュアル: ネットワークアニメーション（描画は main.js）
   canvasは置換要素のため inset だけでは伸びない。width/height必須 */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}

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

/* ヒーロー登場アニメーション（順番にせり上がる） */
.hero-eyebrow,
.hero-title,
.hero-lead,
.hero-actions {
  opacity: 0;
  animation: hero-up 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.hero-eyebrow { animation-delay: 0.15s; }
.hero-title   { animation-delay: 0.3s; }
.hero-lead    { animation-delay: 0.5s; }
.hero-actions { animation-delay: 0.65s; }

@keyframes hero-up {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid var(--color-eyebrow-border);
  border-radius: 999px;
  padding: 8px 20px;
  margin-bottom: 32px;
  background: var(--color-eyebrow-bg);
}

.hero-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

.hero-title {
  font-size: clamp(32px, 5.6vw, 58px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-heading);
  margin-bottom: 28px;
}

.hero-title .accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  max-width: 700px;
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--color-text-muted);
  margin-bottom: 44px;
  text-wrap: pretty;
}

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

.hero-brand {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: clamp(56px, 11vw, 120px);
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--color-hero-brand);
  position: absolute;
  right: -0.06em;
  bottom: 28px;
  z-index: 0;
  user-select: none;
  white-space: nowrap;
  opacity: 0;
  animation: brand-in 1.8s ease 0.5s forwards;
}

@keyframes brand-in {
  from {
    opacity: 0;
    letter-spacing: 0.3em;
  }
  to {
    opacity: 1;
    letter-spacing: 0.12em;
  }
}

/* スクロールインジケーター */
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: "Outfit", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  z-index: 2;
}

.hero-scroll::after {
  content: "";
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  transform-origin: top;
  animation: scroll-line 2.2s ease-in-out infinite;
}

@keyframes scroll-line {
  0%   { transform: scaleY(0); opacity: 1; }
  45%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---- VYRONの由来（About） ---- */
.origin-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.origin-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 32px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.origin-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card);
}

.origin-letter {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 52px;
  line-height: 1;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.origin-word {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--color-heading);
  margin-bottom: 6px;
}

.origin-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.origin-note {
  text-align: center;
  margin-top: 36px;
  color: var(--color-text-muted);
  font-size: 15px;
}

/* ---- コンセプト ---- */
.concept {
  background: var(--color-bg-alt);
}

.concept-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.concept-copy {
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 700;
  line-height: 1.55;
  color: var(--color-heading);
}

.concept-copy .accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.concept-text p + p {
  margin-top: 1.2em;
}

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

/* ---- サービス ---- */
.service-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 36px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-icon-bg);
  margin-bottom: 20px;
}

.service-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-accent);
}

.service-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 4px;
}

.service-en {
  font-family: "Outfit", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: 14px;
}

.service-desc {
  font-size: 14px;
  color: var(--color-text-muted);
}

.service-note {
  text-align: center;
  margin-top: 36px;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ---- 事業内容: 主力事業（建設DX）の大型カード ---- */
.business-featured {
  background: var(--color-surface);
  border: 1px solid var(--color-accent);
  border-radius: 20px;
  padding: 44px 40px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.business-featured-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.business-featured-head .service-name {
  font-size: 23px;
  margin-bottom: 2px;
}

.business-featured-head .service-en {
  margin-bottom: 0;
}

.business-num {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.business-featured-desc {
  font-size: 15px;
  color: var(--color-text-muted);
  max-width: 780px;
  margin-bottom: 24px;
}

.business-sub {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.business-sub li {
  background: var(--color-icon-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-heading);
  text-align: center;
}

/* その他3事業カードの番号 */
.business-cards .business-num {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

/* 残る2事業を横幅いっぱいに均等配置 */
.business-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ---- 会社概要 ---- */
.company {
  background: var(--color-bg-alt);
}

.company-table {
  width: min(860px, 100%);
  margin-inline: auto;
  border-collapse: collapse;
}

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

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

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

/* ---- News ---- */
.news-list {
  width: min(720px, 100%);
  margin-inline: auto;
}

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

.news-list a,
.news-list .news-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding: 22px 8px;
  align-items: baseline;
}

.news-date {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  white-space: nowrap;
}

.news-title {
  font-size: 15px;
  color: var(--color-text);
  transition: color 0.2s;
}

.news-list a:hover .news-title {
  color: var(--color-accent);
}

.news-ext {
  font-size: 12px;
  color: var(--color-accent);
  margin-left: 10px;
  white-space: nowrap;
}

/* ---- お問い合わせ ---- */
.contact {
  text-align: center;
  background: var(--contact-bg);
  position: relative;
  overflow: hidden;
}

.contact .section-head {
  margin-bottom: 32px;
}

.contact-lead {
  max-width: 640px;
  margin: 0 auto 40px;
  color: var(--color-text-muted);
}

/* ---- フッター ---- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-logo {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.18em;
  color: var(--color-heading);
  margin-bottom: 12px;
}

.footer-logo span {
  color: var(--color-accent);
}

.footer-logo img {
  height: 90px;
  width: auto;
  display: block;
  margin-inline: auto;
}

.footer-copyright {
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

/* ドロワー展開中は背面のスクロールをロック */
body.nav-open {
  overflow: hidden;
}

/* ---- スクロールフェードイン ---- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ---- 動きを減らす設定（OS設定優先） ---- */
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow,
  .hero-title,
  .hero-lead,
  .hero-actions,
  .hero-brand {
    animation: none;
    opacity: 1;
  }

  .hero-scroll::after {
    animation: none;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */
@media (max-width: 960px) {
  .origin-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .service-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .business-sub {
    grid-template-columns: repeat(2, 1fr);
  }

  .concept-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 680px) {
  section {
    padding: 72px 0;
  }

  /* ナビ → ドロワー */
  .menu-toggle {
    display: block;
  }

  .gnav {
    position: fixed;
    inset: 0;
    background: var(--color-drawer-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 105;
  }

  .gnav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .gnav ul {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .gnav a {
    font-size: 18px;
  }

  .br-sp {
    display: inline;
  }

  .hero {
    min-height: auto;
    padding: 150px 0 90px;
  }

  /* eyebrowはセンター寄せ＋縮小して1行に収める */
  .hero-eyebrow {
    display: flex;
    width: fit-content;
    margin-inline: auto;
    font-size: 10px;
    letter-spacing: 0.18em;
    white-space: nowrap;
    padding: 7px 16px;
  }

  /* 主力事業カードの見出しを1行に収める */
  .business-featured-head {
    gap: 12px;
  }

  .business-featured-head .service-name {
    font-size: 17px;
    white-space: nowrap;
  }

  .business-featured-head .business-num {
    font-size: 20px;
  }

  .hero-brand {
    bottom: 12px;
  }

  .hero-scroll {
    display: none;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .origin-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .origin-card:last-child {
    grid-column: 1 / -1;
  }

  .service-cards {
    grid-template-columns: 1fr;
  }

  .business-featured {
    padding: 32px 24px;
  }

  .business-sub {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* 見出し列を内容幅に絞り、値（社名等）が1行で収まる幅を確保 */
  .company-table th {
    width: auto;
    padding: 18px 10px 18px 0;
  }

  .company-table td {
    padding: 18px 0 18px 10px;
    font-size: 14px;
  }
}
