/* ===========================================================
   河野義広 ポートフォリオ - 共通スタイル
   配色: 白基調 + ネイビー(#1f3a5f) + 補助グレー
   フレームワーク不使用 / system font
   =========================================================== */

:root {
  --navy: #1f3a5f;
  --navy-dark: #142a47;
  --navy-light: #2f5180;
  --accent: #1f3a5f;
  --text: #232830;
  --text-soft: #555c66;
  --muted: #8a929c;
  --line: #e4e8ed;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --bg-soft2: #eef2f6;
  --shadow: 0 2px 10px rgba(31, 58, 95, 0.06);
  --shadow-hover: 0 8px 26px rgba(31, 58, 95, 0.14);
  --radius: 10px;
  --container: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--navy-light); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  color: var(--navy);
  font-size: 1.18rem;
  letter-spacing: .02em;
}
.brand:hover { text-decoration: none; }
.brand .brand-role {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  display: inline-block;
  padding: 8px 14px;
  color: var(--text);
  font-size: .94rem;
  font-weight: 500;
  border-radius: 6px;
}
.nav a:hover { background: var(--bg-soft2); text-decoration: none; }
.nav a.nav-cta {
  background: var(--navy);
  color: #fff;
  margin-left: 6px;
}
.nav a.nav-cta:hover { background: var(--navy-dark); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 20px;
  height: 2px;
  background: var(--navy);
  transform: translateX(-50%);
  transition: .25s;
}
.nav-toggle span { top: 50%; transform: translate(-50%, -50%); }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-toggle.is-open span::after { top: 0; transform: translateX(-50%) rotate(-45deg); }

/* ---------- ボタン ---------- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background .2s, transform .1s, box-shadow .2s;
  box-shadow: var(--shadow);
}
.btn:hover { background: var(--navy-dark); text-decoration: none; box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.btn-outline {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  box-shadow: none;
}
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- セクション共通 ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-soft); }
.section-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin: 0 0 8px;
  letter-spacing: .02em;
}
.section-lead {
  text-align: center;
  color: var(--text-soft);
  margin: 0 auto 44px;
  max-width: 640px;
}
.section-title::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  background: var(--navy);
  border-radius: 2px;
  margin: 14px auto 0;
}

/* ---------- ヒーロー ---------- */
.hero {
  background: linear-gradient(180deg, #f6f9fc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
  padding: 64px 0 72px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 48px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--navy-light);
  background: var(--bg-soft2);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 2.1rem;
  line-height: 1.5;
  color: var(--navy);
  margin: 0 0 18px;
  letter-spacing: .01em;
}
.hero h1 .accent { color: var(--navy-light); }
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-soft);
  margin: 0 0 28px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-photo {
  justify-self: center;
  text-align: center;
}
.hero-photo .avatar {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #fff;
  box-shadow: 0 10px 34px rgba(31, 58, 95, 0.18);
  background: var(--bg-soft2);
}
/* profile.jpg が無い場合のプレースホルダ（崩れ防止） */
.hero-photo .avatar-fallback {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  font-size: 3.4rem;
  font-weight: 700;
  border: 6px solid #fff;
  box-shadow: 0 10px 34px rgba(31, 58, 95, 0.18);
  margin: 0 auto;
}

/* ---------- プロフィール ---------- */
.profile-body {
  max-width: 760px;
  margin: 0 auto;
}
.profile-body p {
  margin: 0 0 18px;
  color: var(--text);
}
.profile-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.1rem;
}
.profile-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto 34px;
}
.profile-stats .stat {
  flex: 1 1 0;
  min-width: 150px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: 10px;
  padding: 20px 14px;
  box-shadow: var(--shadow);
}
.profile-stats .num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.profile-stats .num-text {
  font-size: 1.6rem;
  letter-spacing: .02em;
}
.profile-stats .num .unit {
  font-size: 1rem;
  font-weight: 700;
  margin-left: 2px;
}
.profile-stats .label {
  margin-top: 8px;
  font-size: .85rem;
  color: var(--text-soft);
  line-height: 1.5;
}
.profile-body .hl {
  font-weight: 700;
  color: var(--navy);
  background: linear-gradient(transparent 62%, #d7e3f2 0);
  padding: 0 .12em;
}
@media (max-width: 600px) {
  .profile-stats .stat { flex-basis: 40%; }
  .profile-stats .num { font-size: 1.8rem; }
}

/* ---------- 強み(カード) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.card .card-num {
  font-size: .8rem;
  font-weight: 700;
  color: var(--navy-light);
  letter-spacing: .1em;
}
.card h3 {
  font-size: 1.12rem;
  color: var(--navy);
  margin: 8px 0 12px;
}
.card p { margin: 0; color: var(--text-soft); font-size: .95rem; }

/* ---------- 資格バッジ ---------- */
.badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}
.badge {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  box-shadow: var(--shadow);
}
.badge::before {
  content: "✓";
  color: var(--navy-light);
  font-weight: 700;
}
@media (max-width: 720px) {
  .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 実績(ポートフォリオ) ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
.article-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.article-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.article-card .thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-soft2);
}
.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.article-card:hover .thumb img { transform: scale(1.04); }
.article-card .card-content {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cat-tag {
  align-self: flex-start;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  background: var(--navy);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.cat-tag.cat-金融 { background: var(--navy); }
.cat-tag.cat-取材 { background: #b9772b; }
.article-card h3 {
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--navy);
  margin: 0 0 10px;
}
.article-card h3 a { color: inherit; }
.article-card h3 a:hover { color: var(--navy-light); text-decoration: none; }
.article-card .date {
  font-size: .82rem;
  color: var(--muted);
  margin: 0 0 10px;
}
.article-card .excerpt {
  font-size: .9rem;
  color: var(--text-soft);
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card .read-more {
  margin-top: auto;
  font-weight: 700;
  font-size: .92rem;
  color: var(--navy-light);
}
.article-card .read-more::after { content: " →"; }

/* ---------- 料金テーブル ---------- */
.price-wrap { max-width: 820px; margin: 0 auto; }
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.price-table th,
.price-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.price-table thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
}
.price-table tbody th {
  font-weight: 700;
  color: var(--navy);
  width: 42%;
  background: var(--bg-soft);
}
.price-table .price {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.price-note {
  text-align: center;
  color: var(--text-soft);
  font-size: .9rem;
  margin-top: 18px;
}

/* ---------- お問い合わせフォーム ---------- */
.contact-wrap { max-width: 760px; margin: 0 auto; }
.contact-iframe { display: block; width: 100%; max-width: 760px; margin: 0 auto; border: 0; background: #fff; border-radius: 12px; box-shadow: var(--shadow); }
.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: 7px;
  color: var(--navy);
}
.form-row .req {
  color: #c0392b;
  font-size: .82rem;
  margin-left: 4px;
}
.form-row .opt {
  color: var(--muted);
  font-size: .8rem;
  margin-left: 4px;
  font-weight: 500;
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--text);
  background: #fff;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(47, 81, 128, 0.12);
}
.form-row textarea { min-height: 140px; resize: vertical; }
.contact-form .btn { width: 100%; }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #cdd6e1;
  padding: 40px 0;
  margin-top: 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.footer-social { display: flex; gap: 18px; }
.footer-social a {
  color: #cdd6e1;
  font-weight: 600;
  font-size: .92rem;
}
.footer-social a:hover { color: #fff; }
.footer-copy { font-size: .85rem; color: #93a2b5; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 32px; }
  .hero-actions { justify-content: center; }
  .hero h1 { font-size: 1.8rem; }
  .cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 10px 16px 18px;
    gap: 2px;
    transform: translateY(-130%);
    transition: transform .28s ease;
    box-shadow: 0 10px 22px rgba(0,0,0,.08);
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 12px 14px; border-radius: 8px; }
  .nav a.nav-cta { margin-left: 0; margin-top: 6px; text-align: center; }
  .nav-toggle { display: block; }

  .section { padding: 52px 0; }
  .hero { padding: 44px 0 52px; }
  .hero h1 { font-size: 1.55rem; }
  .cards { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .price-table th, .price-table td { padding: 12px 14px; font-size: .9rem; }
  .price-table tbody th { width: 38%; }
  .hero-photo .avatar,
  .hero-photo .avatar-fallback { width: 180px; height: 180px; }
}

@media (max-width: 480px) {
  .price-table, .price-table tbody, .price-table tr, .price-table td, .price-table th { display: block; width: 100%; }
  .price-table thead { display: none; }
  .price-table tbody th { background: var(--navy); color: #fff; }
  .price-table td { border-bottom: none; }
  .price-table tr { border-bottom: 1px solid var(--line); }
}
