/* =========================================================
   Noafix corporate site — style.css
   素のCSS。外部フォント・外部依存なし。システムフォントのみ。
   ========================================================= */

:root {
  /* --- カラートークン ------------------------------------ */
  --ink-navy: #0a1428;      /* Heroの最深部 */
  --deep-blue: #123a6b;     /* Heroグラデーション中間 */
  --signal-blue: #2f6fed;   /* プライマリアクセント */
  --sky-tint: #8fb8ff;      /* ダーク背景上のサブアクセント */
  --paper: #ffffff;         /* セクション背景(白) */
  --mist: #f5f8fc;          /* セクション背景(淡い青灰) */
  --line: #e2e8f0;          /* ヘアラインボーダー */
  --ink: #16243d;           /* 本文テキスト(白背景上) */
  --slate: #5b6b83;         /* 補助テキスト */
  --on-dark: #ffffff;       /* ダーク背景上のテキスト */
  --grad-navy: linear-gradient(155deg, var(--ink-navy) 0%, var(--deep-blue) 100%);
  /* assets/*.svg はSVG内にこれらの色を直値で持つ(SVGからCSS変数は参照不可)。色変更時は要同期 */

  /* --- タイポグラフィ -------------------------------------- */
  --font-display: "Hiragino Mincho ProN", "YuMincho", "游明朝", serif;
  --font-body: "Yu Gothic Medium", "YuGothic", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Meiryo", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* --- レイアウト -------------------------------------- */
  --container-w: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --header-h: 72px;

  /* --- モーション -------------------------------------- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   リセット & ベース
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p,
dl,
dd,
table {
  margin: 0;
}

button {
  font: inherit;
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

/* キーボード操作時のみ出現するスキップリンク */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  background: var(--signal-blue);
  color: var(--on-dark);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  transform: translateY(-72px);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}

/* キーボードフォーカスの可視化 */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--signal-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* セクション共通 */
.section {
  padding-block: clamp(64px, 10vw, 120px);
}
.section--mist {
  background: var(--mist);
}
.section--navy {
  background: var(--grad-navy);
  color: #eef3fb;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.section--center .section-head {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--signal-blue);
  margin-bottom: 14px;
}
.section--navy .eyebrow {
  color: var(--sky-tint);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  line-height: 1.5;
  color: var(--ink-navy);
  letter-spacing: 0.02em;
  text-wrap: balance;
}
.section--navy .section-title {
  color: var(--on-dark);
}

.section-lead {
  margin-top: 16px;
  color: var(--slate);
  font-size: 1rem;
  line-height: 1.9;
}
.section--navy .section-lead {
  color: #c3d4ef;
}

/* =========================================================
   ヘッダー
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--ink-navy) 72%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.375rem;
  letter-spacing: 0.03em;
  color: var(--on-dark);
  font-weight: 500;
}
.brand:focus-visible {
  outline-color: var(--sky-tint);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}

.nav__link {
  font-size: 0.875rem;
  color: #dbe6fa;
  letter-spacing: 0.03em;
  padding-block: 6px;
  position: relative;
  transition: color 0.2s var(--ease);
}
.nav__link:not(.nav__link--cta)::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--sky-tint);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav__link:hover,
.nav__link:focus-visible {
  color: var(--on-dark);
}
.nav__link:hover::after,
.nav__link:focus-visible::after {
  transform: scaleX(1);
}

/* ダーク背景上のアウトライン・ピル(ヘッダーCTA / ゴーストボタン / Contactメール) */
.nav__link--cta,
.btn--ghost,
.contact__mail {
  color: var(--on-dark);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
}
.btn--ghost:hover,
.contact__mail:hover,
.contact__mail:focus-visible {
  border-color: var(--sky-tint);
  background: color-mix(in srgb, var(--sky-tint) 8%, transparent);
}

.nav__link--cta {
  padding: 8px 20px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav__link--cta:hover,
.nav__link--cta:focus-visible {
  background: var(--signal-blue);
  border-color: var(--signal-blue);
}

/* モバイルではフォントサイズ・gapを縮小して全リンクを維持する(ハンバーガー無し)。
   それでも収まりきらない幅では .nav 内部のみ横スクロールさせ、
   ページ全体の横スクロールとヘッダーの2行崩れを防ぐ。 */
@media (max-width: 640px) {
  .site-header__inner {
    gap: 8px;
  }
  .brand {
    flex-shrink: 0;
    font-size: 1rem;
  }
  .nav {
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-block: 4px;
  }
  .nav::-webkit-scrollbar {
    display: none;
  }
  .nav__link {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.75rem;
  }
  .nav__link--cta {
    padding: 6px 14px;
  }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 120% at 12% 8%, var(--deep-blue) 0%, var(--ink-navy) 55%),
    var(--grad-navy);
  color: var(--on-dark);
  padding-top: clamp(96px, 16vw, 168px);
  padding-bottom: clamp(96px, 14vw, 148px);
}

.hero__decoration {
  position: absolute;
  right: -8%;
  bottom: -10%;
  width: min(50vw, 640px);
  height: auto;
  opacity: 0.9;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at 68% 55%, #000 50%, transparent 82%);
  mask-image: radial-gradient(circle at 68% 55%, #000 50%, transparent 82%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

/* .eyebrow を継承し、Hero固有の差分のみ上書き */
.hero__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--sky-tint);
  margin-bottom: 28px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5.6vw, 3.5rem);
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--on-dark);
  text-wrap: balance;
}

.hero__lead {
  margin-top: 28px;
  max-width: 46ch;
  font-size: clamp(0.95rem, 1.6vw, 1.0625rem);
  line-height: 2;
  color: #c3d4ef;
}

.hero__actions {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
    border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn--primary {
  background: var(--signal-blue);
  color: var(--on-dark);
  box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--signal-blue) 65%, transparent);
}
.btn--primary:hover {
  background: #4a82f2;
  transform: translateY(-1px);
}

/* =========================================================
   Services
   ========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service-card {
  background: var(--paper);
  padding: clamp(28px, 4vw, 40px);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.service-card__icon {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  color: var(--signal-blue);
  margin-bottom: 24px;
}

.service-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink-navy);
  letter-spacing: 0.02em;
}

.service-card__desc {
  margin-top: 12px;
  color: var(--slate);
  font-size: 0.9375rem;
  line-height: 1.9;
}

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

/* =========================================================
   開発の進め方(Process)
   ========================================================= */
.process {
  position: relative;
}

.process-track {
  /* 接続線は丸バッジの中心を通す。オフセットはバッジ径から導出 */
  --num-size: 56px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.process-track::before {
  content: "";
  position: absolute;
  top: calc(var(--num-size) / 2 - 1px);
  left: calc(12.5% - 2px);
  right: calc(12.5% - 2px);
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    var(--signal-blue) 0,
    var(--signal-blue) 6px,
    transparent 6px,
    transparent 13px
  );
  opacity: 0.55;
}

.process-step {
  position: relative;
}

.process-step__num {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--num-size);
  height: var(--num-size);
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--signal-blue);
  color: var(--ink-navy);
  font-family: var(--font-display);
  font-size: 1.375rem;
  margin-bottom: 24px;
}

.process-step__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ink-navy);
  letter-spacing: 0.01em;
}

.process-step__desc {
  margin-top: 10px;
  font-size: 0.875rem;
  line-height: 1.9;
  color: var(--slate);
}

/* =========================================================
   会社概要
   ========================================================= */
.company-table {
  width: 100%;
  border-collapse: collapse;
}
.company-table tr {
  border-bottom: 1px solid var(--line);
}
.company-table tr:first-child {
  border-top: 1px solid var(--line);
}
.company-table th,
.company-table td {
  text-align: left;
  padding: 22px 0;
  vertical-align: top;
}
.company-table th {
  width: 9.5em;
  font-weight: 500;
  color: var(--slate);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding-right: 24px;
}
.company-table td {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--ink);
  line-height: 1.9;
}

/* =========================================================
   Contact
   ========================================================= */
.contact {
  text-align: center;
}

.contact__mail {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 3vw, 1.5rem);
  padding: 18px 32px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.contact__mail-icon {
  width: 20px;
  height: 20px;
  color: var(--sky-tint);
  flex-shrink: 0;
}

.contact__note {
  margin-top: 20px;
  font-size: 0.8125rem;
  color: #93a8ca;
}

/* =========================================================
   フッター
   ========================================================= */
.site-footer {
  background: var(--ink-navy);
  color: #93a8ca;
  padding-block: 32px;
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8125rem;
}
.site-footer__brand {
  font-family: var(--font-display);
  color: #dbe6fa;
  letter-spacing: 0.02em;
}

/* =========================================================
   スクロールフェードイン(js/main.js が .is-visible を付与)
   js/main.js の先頭で <html> に .js を付与するため、
   このルールは "JSが実行された場合のみ" 適用される。
   JS無効時・読み込み失敗時は .js が付かず、要素は最初から等倍で見える
   (Contactのnoscriptフォールバックを含む全セクションが不可視化しないための対策)。
   ========================================================= */
.js [data-animate] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js [data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
   レスポンシブ
   ========================================================= */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .process-track {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .process-track::before {
    top: 0;
    bottom: 0;
    left: calc(var(--num-size) / 2 - 1px);
    right: auto;
    width: 1px;
    height: auto;
    background: repeating-linear-gradient(
      180deg,
      var(--signal-blue) 0,
      var(--signal-blue) 6px,
      transparent 6px,
      transparent 13px
    );
  }
  .process-step {
    display: grid;
    grid-template-columns: var(--num-size) 1fr;
    column-gap: 20px;
  }
  .process-step__num {
    margin-bottom: 0;
  }
  .process-step__title,
  .process-step__desc {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .company-table th,
  .company-table td {
    display: block;
    width: auto;
    padding: 0;
  }
  .company-table th {
    padding-top: 20px;
  }
  .company-table td {
    padding-bottom: 20px;
  }
  .company-table tr {
    display: block;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    justify-content: center;
  }
}
