/* =========================================================
   Nami | AWS Infrastructure Engineer — Portfolio
   白基調 × ネイビー / ブルー。色は :root の変数でまとめて変更できます。
   ========================================================= */

:root {
  --navy-900: #0b2545;
  --navy-800: #13315c;
  --navy-700: #1d3f6e;
  --blue-600: #1f5fbf;
  --blue-500: #2b74d8;
  --blue-100: #e6effb;
  --blue-50:  #f3f7fd;

  --ink:      #17202e;
  --ink-2:    #3c4757;
  --ink-3:    #5f6b7c;
  --line:     #dde3ec;
  --line-2:   #e9edf3;
  --bg:       #ffffff;
  --bg-tint:  #f6f8fb;

  --amber-bg: #fff6e0;
  --amber-ink:#7a5300;
  --gray-bg:  #eef1f5;
  --gray-ink: #4a5566;
  --green-bg: #e5f4ec;
  --green-ink:#1d6b44;

  --radius:   12px;
  --radius-s: 8px;
  --shadow:   0 1px 2px rgba(11, 37, 69, .04), 0 4px 16px rgba(11, 37, 69, .06);

  --font-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --font-en: "Inter", "Segoe UI", "Helvetica Neue", Arial, var(--font-ja);

  --container: 1120px;
  --gutter: 24px;
  --header-h: 68px;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ja);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
  line-break: strict;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-underline-offset: .2em; }
strong { font-weight: 700; color: var(--navy-900); }

:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.phrase { display: inline-block; }
.br-pc { display: none; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: var(--radius-s);
  text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line-2);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy-900); }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
  background: var(--navy-900); color: #fff; font-family: var(--font-en); font-weight: 700; font-size: 18px; letter-spacing: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-en); font-weight: 700; font-size: 17px; letter-spacing: .01em; }
.brand-role { font-family: var(--font-en); font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }

.global-nav ul { display: flex; align-items: center; gap: 4px; }
.global-nav a {
  display: block; padding: 8px 12px; border-radius: var(--radius-s);
  font-family: var(--font-en); font-size: 14.5px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color .15s, background-color .15s;
}
.global-nav a:hover { color: var(--navy-900); background: var(--blue-50); }
.global-nav .nav-cta { background: var(--navy-900); color: #fff; margin-left: 8px; padding: 8px 18px; }
.global-nav .nav-cta:hover { background: var(--navy-700); color: #fff; }

.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 26px; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none; letter-spacing: .04em;
  border: 1.5px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--navy-900); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }
.btn-secondary { background: #fff; color: var(--navy-900); border-color: var(--navy-900); }
.btn-secondary:hover { background: var(--blue-50); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-en); font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue-600); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 104px;
  background:
    linear-gradient(180deg, rgba(243, 247, 253, .0) 0%, var(--blue-50) 100%),
    var(--bg);
  border-bottom: 1px solid var(--line-2);
}
/* 控えめなグリッド模様（設計図のイメージ） */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(31, 95, 191, .06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 95, 191, .06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 85% 30%, #000 10%, transparent 70%);
          mask-image: radial-gradient(ellipse 70% 80% at 85% 30%, #000 10%, transparent 70%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero-title {
  margin-top: 20px;
  font-size: clamp(28px, 3.6vw, 42px); line-height: 1.5; font-weight: 700; color: var(--navy-900); letter-spacing: .03em;
}
.hero-lead { margin-top: 24px; color: var(--ink-2); font-size: 16.5px; max-width: 36em; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  padding: 28px 30px;
}
.hero-card-label {
  font-family: var(--font-en); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 14px; border-bottom: 1px solid var(--line-2);
}
.facts .fact { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.facts .fact:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { font-size: 13px; color: var(--ink-3); font-weight: 500; padding-top: 2px; }
.facts dd { font-size: 15px; font-weight: 700; color: var(--navy-900); line-height: 1.6; }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section-tinted { background: var(--bg-tint); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.section-head { max-width: 760px; margin-bottom: 52px; }
.section-title { margin-top: 12px; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.45; color: var(--navy-900); letter-spacing: .04em; }
.section-lead { margin-top: 18px; color: var(--ink-2); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.about-text p + p { margin-top: 1.2em; }
.about-text p { color: var(--ink-2); font-size: 16.5px; }
.values { display: grid; gap: 16px; }
.value {
  position: relative; padding: 22px 24px 22px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.value::before { content: ""; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: var(--blue-600); }
.value-en { font-family: var(--font-en); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-600); }
.value-title { font-size: 17px; color: var(--navy-900); margin-top: 2px; }
.value p { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); line-height: 1.75; }

/* ---------- Skills ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: -24px 0 32px; font-size: 14px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 10px; }

.level {
  display: inline-block; flex-shrink: 0; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.7; letter-spacing: .04em; white-space: nowrap;
}
.level-use  { background: var(--blue-100); color: var(--navy-800); }
.level-know { background: var(--gray-bg);  color: var(--gray-ink); border: 1px dashed #b7c0cd; }

.skill-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.skill-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; }
.skill-cat {
  font-family: var(--font-en); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2);
}
.skill-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.skill-list li + li { border-top: 1px dashed var(--line-2); }
.skill-name { font-family: var(--font-en); font-weight: 700; color: var(--navy-900); font-size: 16px; letter-spacing: .01em; }
.skill-note { margin-top: 8px; font-size: 13px; line-height: 1.65; color: var(--ink-3); }

.note {
  margin-top: 28px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  padding: 16px 20px; border-radius: var(--radius-s); background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 14.5px;
}
.note-label { font-family: var(--font-en); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-600); }

/* ---------- Services ---------- */
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px;
  transition: border-color .2s, box-shadow .2s;
}
.service-card:hover { border-color: #c3d3ea; box-shadow: var(--shadow); }
.service-no { font-family: var(--font-en); font-size: 13px; font-weight: 700; color: var(--blue-600); letter-spacing: .1em; }
.service-title { margin-top: 10px; font-size: 18px; line-height: 1.5; color: var(--navy-900); }
.service-card p { margin-top: 12px; font-size: 14.5px; color: var(--ink-2); line-height: 1.8; }

.scope {
  margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff;
}
.scope-col { padding: 28px 30px; }
.scope-col + .scope-col { border-left: 1px solid var(--line); background: var(--bg-tint); }
.scope-title { font-size: 16px; color: var(--navy-900); margin-bottom: 14px; }
.check-list li, .cross-list li { position: relative; padding-left: 28px; font-size: 14.5px; color: var(--ink-2); }
.check-list li + li, .cross-list li + li { margin-top: 8px; }
.check-list li::before, .cross-list li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 18px; height: 18px; border-radius: 50%;
  background-repeat: no-repeat; background-position: center; background-size: 10px;
}
.check-list li::before {
  background-color: var(--blue-100);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3l2.5 2.4L10 3.3' fill='none' stroke='%2313315c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.cross-list li::before {
  background-color: var(--gray-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 3l6 6M9 3l-6 6' fill='none' stroke='%234a5566' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- Portfolio ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.work-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.work-figure { aspect-ratio: 16 / 10; background: var(--blue-50); border-bottom: 1px solid var(--line-2); }
.work-figure img { width: 100%; height: 100%; object-fit: cover; }
.work-body { padding: 24px 26px 28px; }
.work-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.work-no { white-space: nowrap; font-family: var(--font-en); font-size: 12.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-wip  { background: var(--amber-bg); color: var(--amber-ink); }
.status-plan { background: var(--gray-bg); color: var(--gray-ink); }
.status-done { background: var(--green-bg); color: var(--green-ink); }
.work-title { margin-top: 14px; font-size: 19px; line-height: 1.5; color: var(--navy-900); }
.work-detail { margin-top: 16px; display: grid; grid-template-columns: 6em 1fr; gap: 12px 16px; font-size: 14.5px; }
.work-detail dt { color: var(--ink-3); font-weight: 700; font-size: 13px; padding-top: 2px; }
.work-detail dd { color: var(--ink-2); line-height: 1.75; }
.pending-text { color: var(--ink-3) !important; font-style: normal; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 1px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-tint);
  font-family: var(--font-en); font-size: 12.5px; font-weight: 500; color: var(--navy-800); line-height: 1.8;
}

/* Featured work (Work 01) */
.work-card--featured { grid-column: 1 / -1; }
.work-card--featured .work-body { padding: 28px 32px 32px; }
.work-figure--diagram { aspect-ratio: auto; background: #fff; padding: 24px 24px 20px; }
.work-figure--diagram .diagram-trigger { max-width: 1000px; margin: 0 auto; }
@media (min-width: 1024px) {
  .work-card--featured .work-detail { grid-template-columns: 7em 1fr; max-width: 880px; }
}
.work-figure--diagram img { height: auto; object-fit: contain; }
.diagram-trigger { position: relative; display: block; width: 100%; border-radius: var(--radius-s); cursor: zoom-in; }
.diagram-trigger img { border: 1px solid var(--line-2); border-radius: var(--radius-s); }
.diagram-zoom-hint {
  position: absolute; right: 10px; bottom: 10px; padding: 4px 12px; border-radius: 999px;
  background: rgba(11, 37, 69, .86); color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
}
.work-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.status-sample { background: var(--blue-100); color: var(--navy-800); }
.status-sample::before { display: none; }
.work-note { margin-top: 10px; padding: 10px 14px; border-left: 3px solid var(--blue-600); background: var(--blue-50); font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.work-points li { position: relative; padding-left: 16px; }
.work-points li + li { margin-top: 6px; }
.work-points li::before { content: ""; position: absolute; left: 2px; top: .75em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-600); }
.work-actions { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.btn-small { min-height: 44px; padding: 10px 20px; font-size: 14px; }
.text-link { font-size: 14px; font-weight: 700; }
.file-meta { margin-left: -8px; font-size: 12.5px; color: var(--ink-3); }

/* Diagram viewer (dialog) */
.viewer {
  width: min(1680px, 100vw - 32px); height: min(100vh - 32px, 100dvh - 32px); max-width: none; max-height: none;
  padding: 0; border: 0; border-radius: 12px; background: #fff; color: var(--ink);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .35); overflow: hidden;
}
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: rgba(8, 20, 38, .72); }
.viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--line); }
.viewer-title { font-weight: 700; font-size: 15px; color: var(--navy-900); }
.viewer-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.viewer-btn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; color: var(--navy-900); font: inherit; font-size: 13.5px; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.viewer-btn:hover { background: var(--blue-50); }
.viewer-close { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.viewer-close:hover { background: var(--navy-700); }
.viewer-body { flex: 1; overflow: auto; padding: 16px; background: var(--bg-tint); -webkit-overflow-scrolling: touch; }
.viewer-body img { width: 100%; max-width: 1600px; height: auto; margin: 0 auto; background: #fff; }
.viewer.is-actual .viewer-body img { width: var(--actual-width, 1600px); max-width: none; }

/* ---------- Work style ---------- */
.style-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.style-item { padding: 28px 26px; background: #fff; }
.style-item + .style-item { border-left: 1px solid var(--line); }
.style-item dt { font-size: 13.5px; color: var(--ink-3); font-weight: 500; display: flex; flex-direction: column; gap: 2px; }
.style-en { font-family: var(--font-en); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-600); }
.style-item dd { margin-top: 10px; font-size: 19px; font-weight: 700; color: var(--navy-900); line-height: 1.5; }
.style-note { margin-top: 20px; font-size: 14px; color: var(--ink-3); }

/* ---------- Contact ---------- */
.section-contact { background: var(--navy-900); color: #dbe5f3; }
.section-contact .section-title { color: #fff; }
.section-contact .section-lead { color: #c3d0e3; }
.eyebrow-light { color: #8fb6ef; }

.contact-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.contact-links:empty { display: none; }
.contact-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 24px; border-radius: var(--radius); text-decoration: none;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .18); color: #fff;
  transition: background-color .15s, border-color .15s;
}
.contact-link:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); }
.contact-link-name { font-weight: 700; font-size: 16px; }
.contact-link-sub { display: block; font-family: var(--font-en); font-size: 12px; color: #a9bbd6; letter-spacing: .06em; font-weight: 500; }
.contact-link-arrow { font-family: var(--font-en); font-size: 18px; color: #8fb6ef; }
.contact-empty {
  padding: 20px 24px; border-radius: var(--radius); border: 1px dashed rgba(255, 255, 255, .28); color: #c3d0e3; font-size: 15px;
}
.contact-empty[hidden] { display: none; }

.flow { margin-top: 48px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: none; }
.flow li {
  padding: 16px 16px 18px; border-radius: var(--radius-s); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .12);
  font-size: 14.5px; font-weight: 700; color: #fff; line-height: 1.6;
}
.flow-step { display: block; font-family: var(--font-en); font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8fb6ef; margin-bottom: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: #081b33; color: #9fb0c8; padding: 40px 0 32px; font-size: 13px; }
.footer-inner { display: grid; gap: 12px; }
.footer-name { font-family: var(--font-en); font-weight: 700; color: #fff; font-size: 15px; }
.footer-name span { font-weight: 500; color: #9fb0c8; font-size: 12.5px; margin-left: 8px; letter-spacing: .04em; }
.footer-note { line-height: 1.8; }
.footer-copy { font-family: var(--font-en); color: #7f92ad; }

/* =========================================================
   Responsive
   ========================================================= */
@media (min-width: 900px) {
  .br-pc { display: inline; }
}

@media (max-width: 1023px) {
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .style-item:nth-child(3) { border-left: 0; }
  .style-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  :root { --gutter: 20px; --header-h: 60px; }

  /* モバイルメニュー */
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; margin-right: -8px;
    background: transparent; border: 0; border-radius: var(--radius-s); cursor: pointer; color: var(--navy-900);
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    content: ""; display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s;
  }
  .nav-toggle-bar { position: relative; }
  .nav-toggle-bar::before { position: absolute; top: -7px; }
  .nav-toggle-bar::after  { position: absolute; top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { transform: translateY(-7px) rotate(-45deg); }

  .global-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(11, 37, 69, .08);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .global-nav.is-open { display: block; }
  /* JSが無効な環境ではメニューを常に表示 */
  .no-js .global-nav { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 12px; }
  .no-js .nav-toggle { display: none; }
  .no-js .header-inner { flex-wrap: wrap; height: auto; padding-top: 10px; }

  .global-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .global-nav li + li { border-top: 1px solid var(--line-2); }
  .global-nav a { padding: 14px 4px; font-size: 16px; border-radius: 0; }
  .global-nav a:hover { background: transparent; }
  .global-nav .nav-cta { margin: 12px 0 0; padding: 14px; text-align: center; border-radius: 999px; }
  .global-nav li:last-child { border-top: 0; }

  .hero { padding: 64px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-lead { font-size: 15.5px; }

  .section { padding: 76px 0; }
  .section-head { margin-bottom: 40px; }

  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-text p { font-size: 15.5px; }

  .work-grid { grid-template-columns: 1fr; }
  .work-figure--diagram { padding: 14px; }
  .work-card--featured .work-body { padding: 22px 22px 26px; }
  .scope { grid-template-columns: 1fr; }
  .scope-col + .scope-col { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 599px) {
  body { font-size: 15px; }
  .brand-role { font-size: 10.5px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-card { padding: 22px 20px; }
  .facts .fact { grid-template-columns: 5.5em 1fr; }

  .legend { margin-top: -16px; flex-direction: column; align-items: flex-start; }
  .legend li { align-items: flex-start; }
  .skill-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { padding: 24px 22px; }
  .scope-col { padding: 24px 22px; }

  .work-body { padding: 20px 20px 24px; }
  .work-detail { grid-template-columns: 1fr; gap: 4px; }
  .work-detail dd + dt { margin-top: 10px; }

  .style-grid { grid-template-columns: 1fr; }
  .style-item + .style-item { border-left: 0; border-top: 1px solid var(--line); }
  .style-item { padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .style-item dd { margin-top: 0; font-size: 16px; text-align: right; }

  .flow { grid-template-columns: 1fr; }
  .viewer { width: 100vw; height: 100dvh; border-radius: 0; }
  .viewer-header { flex-direction: column; align-items: stretch; padding: 10px 12px; }
  .viewer-tools { justify-content: flex-start; }
  .viewer-body { padding: 8px; }
  .flow li { display: flex; align-items: baseline; gap: 14px; padding: 14px 16px; }
  .flow-step { margin-bottom: 0; flex-shrink: 0; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .nav-toggle, .hero-actions, .skip-link { display: none !important; }
  .section, .hero { padding: 32px 0; }
  .section-contact { background: #fff; color: var(--ink); }
  .section-contact .section-title { color: var(--navy-900); }
}
