/* ============================================================
   共有デザインシステム — index.html / for-companies.html 共通
   タイポスケール・フォーカスリング・エレベーションは
   デジタル庁デザインシステム(DADS)のトークン構造を参考に構築。
   色とトーンは本サイト独自(紙×深緑×明朝)を維持。
   ============================================================ */

:root {
  /* --- 色: Primitive → Semantic の2層構造(DADS方式) --- */
  --bg: #f7f5ef;
  --bg-2: #eeebe2;
  --ink: #201f1b;
  --ink-2: #504f48;
  --ink-3: #6f7068;
  --line: #ddd9cd;
  --accent: #1c5340;
  --accent-2: #2f6e56;
  --accent-ink: #f3f8f4;
  --focus-ring: #f5c518; /* DADSのfocus-visibleパターン(黒枠+黄リング)を踏襲 */
  --wash: radial-gradient(720px 460px at 82% -60px, rgba(28, 83, 64, 0.07), transparent 70%);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  /* --- タイプスケール: DADSのFontSizeトークン(14/16/18/20/24/28/32/36/45px)を採用 --- */
  --fs-100: 0.875rem;  /* 14px caption */
  --fs-200: 1rem;       /* 16px body */
  --fs-300: 1.125rem;   /* 18px lead */
  --fs-400: 1.25rem;    /* 20px small heading */
  --fs-500: 1.5rem;     /* 24px h3 */
  --fs-600: 1.75rem;    /* 28px h2 */
  --fs-700: 2.25rem;    /* 36px h1 mobile */
  --fs-800: 2.8125rem;  /* 45px h1 desktop */

  /* --- 行間: DADSのLineHeightトークン(130/140/160/175%) --- */
  --lh-tight: 1.3;
  --lh-snug: 1.4;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;

  /* --- 角丸: DADSのBorderRadiusトークン(4/8/16/9999px) --- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* --- 影: DADSのElevationトークン(2層の重ねシャドウ)を踏襲 --- */
  --shadow-1: 0 2px 8px 1px rgba(20,20,15,0.08), 0 1px 5px rgba(20,20,15,0.12);
  --shadow-2: 0 4px 16px 2px rgba(20,20,15,0.10), 0 1px 6px rgba(20,20,15,0.16);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171713;
    --bg-2: #1e1e18;
    --ink: #eae8e0;
    --ink-2: #a9aa9f;
    --ink-3: #82837a;
    --line: #2e2e27;
    --accent: #a3d4b4;
    --accent-2: #8fc4a3;
    --accent-ink: #0f2e1f;
    --focus-ring: #f5c518;
    --wash: radial-gradient(720px 460px at 82% -60px, rgba(163, 212, 180, 0.05), transparent 70%);
    --shadow-1: 0 2px 8px 1px rgba(0,0,0,0.35), 0 1px 5px rgba(0,0,0,0.45);
    --shadow-2: 0 4px 16px 2px rgba(0,0,0,0.4), 0 1px 6px rgba(0,0,0,0.5);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--wash), var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: var(--fs-200);
  line-height: var(--lh-relaxed);
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
}
@media (prefers-color-scheme: dark) { body::before { opacity: 0.04; } }
main, header, footer { position: relative; z-index: 1; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; }
.serif { font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; font-weight: 600; }

/* --- フォーカスリング: DADSの実装(4px黒アウトライン + 2pxオフセット + 黄色いリング)を踏襲 ---
   キーボード操作時にどこにフォーカスがあるか誰の目にも明確にするための高コントラスト設計。 */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--focus-ring);
  border-radius: 2px;
}
@media (prefers-color-scheme: dark) {
  :focus-visible { outline-color: var(--bg); }
}

/* Header */
header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.header-in { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 16px; }
.logo { font-weight: 700; font-size: var(--fs-100); letter-spacing: 0.05em; text-decoration: none; flex-shrink: 0; }
nav { display: flex; gap: 22px; align-items: center; }
nav a.navlink { font-size: 13.5px; color: var(--ink-2); text-decoration: none; transition: color 160ms ease; white-space: nowrap; }
nav a.navlink:hover { color: var(--ink); }
@media (max-width: 640px) {
  nav a.navlink { display: none; }
  nav { gap: 12px; }
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--accent); text-decoration: none;
  padding: 7px 14px; border-radius: var(--radius-full);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: background 160ms ease, transform 160ms var(--ease-out);
}
.nav-cta:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.nav-cta:active { transform: scale(0.97); }

/* Buttons — DADSの二重ボーダー手法を主要CTAに採用(層のある縁取り) */
.btn {
  display: inline-block;
  background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 600; font-size: var(--fs-100);
  padding: 12px 26px; border-radius: var(--radius-full);
  border: 3px double transparent; background-clip: padding-box;
  transition: transform 160ms var(--ease-out), opacity 160ms ease;
}
.btn:hover { opacity: 0.92; }
.btn:active { transform: scale(0.97); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); border: none; }
.btn.lg { font-size: var(--fs-300); padding: 14px 32px; }

/* Hero */
.hero { padding: 88px 0 28px; display: flex; gap: 48px; align-items: center; }
.hero-txt { flex: 1; }
.overline { font-size: var(--fs-100); font-weight: 600; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 22px; }
h1 {
  font-size: clamp(1.6rem, 4.8vw, var(--fs-800));
  line-height: var(--lh-relaxed);
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.hero-sub { margin-top: 26px; color: var(--ink-2); max-width: 38em; text-wrap: pretty; font-size: var(--fs-200); }
@media (max-width: 640px) { .pc-br { display: none; } }
.cta-row { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-photo { flex-shrink: 0; width: 228px; }
.hero-photo img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: var(--radius-sm); display: block;
  box-shadow: var(--shadow-2);
}
@media (max-width: 640px) {
  .hero { flex-direction: column-reverse; align-items: flex-start; gap: 32px; padding-top: 56px; }
  .hero-photo { width: 168px; }
}

/* Sections */
section { padding: 72px 0 0; }
section .sec-in { border-top: 1px solid var(--line); padding-top: 56px; }
.kicker { font-size: var(--fs-100); font-weight: 700; color: var(--accent); letter-spacing: 0.06em; margin-bottom: 10px; }
h2.sec-title { font-size: clamp(var(--fs-500), 3vw, var(--fs-600)); line-height: var(--lh-tight); letter-spacing: 0.01em; margin-bottom: 34px; text-wrap: balance; }

/* Stat strip */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stat .num { font-size: var(--fs-600); font-weight: 700; letter-spacing: -0.01em; line-height: var(--lh-tight); color: var(--accent); }
.stat .num small { font-size: var(--fs-400); font-weight: 600; }
.stat .label { font-size: var(--fs-100); color: var(--ink-2); margin-top: 6px; line-height: var(--lh-normal); }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; gap: 18px; } }

/* 悩みパネル */
.pain-panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 40px 40px 24px; }
@media (max-width: 560px) { .pain-panel { padding: 28px 22px 14px; } }
.pain { list-style: none; }
.pain li { padding: 15px 0 15px 26px; border-bottom: 1px solid var(--line); position: relative; font-size: var(--fs-300); color: var(--ink-2); }
.pain li:last-child { border-bottom: none; }
.pain li::before { content: "—"; position: absolute; left: 0; color: var(--accent); font-weight: 600; }
.pain-bridge { margin-top: 26px; font-size: var(--fs-200); line-height: var(--lh-relaxed); }
.pain-bridge strong { font-weight: 700; }

/* Flow(工程) */
.flow-steps { display: flex; flex-direction: column; }
.flow-step { display: flex; gap: 18px; align-items: flex-start; }
.flow-rail { display: flex; flex-direction: column; align-items: center; align-self: stretch; }
.flow-dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--accent); margin-top: 13px; flex-shrink: 0; }
.flow-line { width: 1px; flex: 1; background: var(--line); }
.flow-step:last-child .flow-line { display: none; }
.flow-step p { font-weight: 600; font-size: var(--fs-300); padding-bottom: 22px; }
.flow-note { margin-top: 30px; color: var(--ink-2); border-left: 2px solid var(--accent); padding-left: 20px; max-width: 38em; }

/* 料金の階段 */
.ladder { display: flex; flex-direction: column; }
.rung { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.rung:last-child { border-bottom: none; }
.rung .n {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--radius-full);
  border: 1px solid var(--line); color: var(--ink-2);
  display: grid; place-items: center; font-size: var(--fs-100); font-weight: 600;
  margin-top: 3px;
}
.rung h3 { font-size: var(--fs-300); font-weight: 700; }
.rung h3 em { font-style: normal; font-weight: 500; font-size: var(--fs-100); color: var(--accent); margin-left: 10px; }
.rung p { font-size: var(--fs-200); color: var(--ink-2); margin-top: 6px; }

/* タイムライン(経歴) — hodalab参考、丸写真は使わず年号+ドット+カードの1レーン構成 */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 24px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; width: 12px; flex-shrink: 0; }
.tl-dot { width: 12px; height: 12px; border-radius: var(--radius-full); background: var(--bg); border: 2px solid var(--accent); margin-top: 6px; flex-shrink: 0; }
.tl-line { width: 1px; flex: 1; background: var(--line); margin-top: 4px; }
.tl-item:last-child .tl-line { display: none; }
.tl-body { padding-bottom: 40px; flex: 1; }
.tl-year { font-size: var(--fs-100); font-weight: 700; color: var(--accent); letter-spacing: 0.04em; margin-bottom: 4px; }
.tl-title { font-size: var(--fs-400); font-weight: 700; }
.tl-desc { font-size: var(--fs-200); color: var(--ink-2); margin-top: 8px; }

/* Work */
.case { padding: 36px 0; border-bottom: 1px solid var(--line); }
.case:first-of-type { padding-top: 0; }
.case:last-child { border-bottom: none; }
.case h3 { font-size: var(--fs-400); line-height: var(--lh-normal); letter-spacing: 0.01em; }
.case-block { margin-top: 16px; display: flex; gap: 18px; }
.case-block .lbl { flex-shrink: 0; width: 4.6em; font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.1em; padding-top: 6px; }
.case-block p { font-size: var(--fs-200); color: var(--ink-2); }
.case .tech { margin-top: 16px; font-size: var(--fs-100); color: var(--ink-3); letter-spacing: 0.02em; }

/* スキル: レーダーチャート */
.radar-wrap { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.radar-chart { flex-shrink: 0; overflow: visible; margin-right: 20px; }
.radar-chart .grid { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-chart .axis { stroke: var(--line); stroke-width: 1; }
.radar-chart .shape { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.radar-chart .pt { fill: var(--accent); }
.radar-chart text { font-size: 12px; fill: var(--ink-2); font-family: inherit; }
.radar-legend { flex: 1; min-width: 220px; font-size: var(--fs-100); color: var(--ink-2); }
.radar-legend div { padding: 5px 0; display: flex; gap: 10px; }
.radar-legend b { color: var(--ink); font-weight: 700; width: 1.3em; flex-shrink: 0; }

/* Skills(詳細リスト) */
.skills { display: flex; flex-direction: column; gap: 4px; margin-top: 40px; }
.skill { display: flex; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.skill:last-child { border-bottom: none; }
.skill h3 { font-size: var(--fs-100); font-weight: 700; width: 11em; flex-shrink: 0; }
.skill p { font-size: var(--fs-100); color: var(--ink-2); }
@media (max-width: 560px) { .skill { flex-direction: column; gap: 2px; } .skill h3 { width: auto; } }

/* Person */
.person-quote { font-size: var(--fs-300); line-height: var(--lh-relaxed); max-width: 34em; }
.photo-grid { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); display: block; box-shadow: var(--shadow-1); }
@media (max-width: 560px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }

/* About */
.about-cols { display: flex; flex-direction: column; gap: 34px; }
.about-col h3 { font-size: var(--fs-500); margin-bottom: 10px; letter-spacing: 0.02em; }
.about-col ul { list-style: none; }
.about-col li { font-size: var(--fs-200); color: var(--ink-2); padding: 4px 0 4px 18px; position: relative; }
.about-col li::before { content: "·"; position: absolute; left: 2px; color: var(--ink-3); }

/* Contact */
.contact { text-align: center; padding: 100px 0 96px; }
.contact h2 { font-size: clamp(var(--fs-500), 3.4vw, var(--fs-600)); line-height: var(--lh-relaxed); letter-spacing: 0.01em; }
.contact p { color: var(--ink-2); margin-top: 20px; max-width: 33em; margin-left: auto; margin-right: auto; }
.contact .btn { margin-top: 36px; }
.contact .mail { margin-top: 20px; font-size: var(--fs-100); }
.contact .mail a { color: var(--ink-3); }
.contact .swap { margin-top: 28px; font-size: var(--fs-100); }
.contact .swap a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: var(--fs-100); color: var(--ink-3); }
.footer-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* Reveal(初見のみのフェードイン。頻繁に見る要素には使わない) */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; transition: opacity 200ms ease; }
  .btn, .btn:active { transition: none; transform: none; }
}
