/* =========================================================
   Imedique INC. — Website stylesheet  (Pattern B)
   Style: flat / accessible / public-sector inspired
   Palette: pale blue fills + navy text
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --blue:        #2767ad;   /* readable medium blue: text, links, icons on white */
  --blue-hover:  #1f5491;
  --fill:        #c4dcf4;   /* pale blue: large fills (buttons, panels, CTA, badges) */
  --fill-hover:  #aecfee;
  --navy:        #123a66;   /* dark text / icons placed on pale-blue fills */
  --blue-soft:   #e4eefb;
  --blue-tint:   #f1f6fc;

  --ink:         #1a1a1c;
  --ink-sub:     #54545e;
  --muted:       #6f6f78;
  --border:      #d4d6de;
  --border-dark: #b9bcc7;

  --bg:          #ffffff;
  --bg-gray:     #f2f4f8;
  --green:       #007a4d;

  --radius:      8px;
  --maxw:        1120px;

  --font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic",
          "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.9;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.45; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; }

/* accessible focus indicator */
*:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Language switch ---------- */
html[data-lang="ja"] .lang-en { display: none !important; }
html[data-lang="en"] .lang-ja { display: none !important; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  z-index: 200;
  text-decoration: none;
  font-weight: 700;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ---------- Layout helpers ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 76px 0; }
.section--gray { background: var(--bg-gray); }
.narrow { max-width: 820px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.section-head-text { max-width: 760px; }
.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--blue);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.55rem, 3.2vw, 2.05rem);
  color: var(--ink);
  letter-spacing: .01em;
}
.section-lead {
  margin-top: 14px;
  color: var(--ink-sub);
  font-size: 1.02rem;
}
.center { text-align: center; }
.center .section-head-text { margin: 0 auto; }

/* ---------- Arrow link ---------- */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  white-space: nowrap;
}
.arrow-link::after { content: "›"; font-size: 1.25em; line-height: 1; }
.arrow-link:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.btn::after { content: "→"; font-weight: 700; }
.btn-primary { background: var(--fill); color: var(--navy); border-color: var(--fill); }
.btn-primary:hover { background: var(--fill-hover); border-color: var(--fill-hover); color: var(--navy); }
.btn-outline { background: #fff; color: var(--navy); border-color: #b6cfe8; }
.btn-outline:hover { background: var(--blue-soft); }
.btn-plain::after { content: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name { font-weight: 800; font-size: 1.2rem; color: var(--ink); letter-spacing: .02em; }
.brand-tag { font-size: .68rem; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 10px 14px;
  font-size: .94rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--blue); }
.nav a.active { color: var(--blue); border-bottom-color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  overflow: hidden;
}
.lang-toggle button {
  border: 0;
  background: #fff;
  padding: 8px 13px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-sub);
  cursor: pointer;
  font-family: var(--font);
}
.lang-toggle button.active { background: var(--fill); color: var(--navy); }

.header-cta { padding: 10px 18px; font-size: .92rem; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  margin: 0 auto;
  position: relative;
  transition: transform .25s, opacity .2s;
}
.nav-toggle span::before { content: ""; position: absolute; top: -7px; }
.nav-toggle span::after  { content: ""; position: absolute; top: 7px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span::after  { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: var(--bg-gray);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 50px;
  align-items: center;
  padding: 78px 0;
}
.hero-eyebrow {
  display: inline-block;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--blue);
  border-left: 4px solid var(--blue);
  padding-left: 12px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 22px;
}
.hero h1 .hl { color: var(--blue); }
.hero-lead {
  font-size: 1.08rem;
  color: var(--ink-sub);
  margin-bottom: 30px;
  max-width: 560px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* hero side panel */
.hero-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.hero-panel h2 {
  font-size: .92rem;
  letter-spacing: .04em;
  color: var(--navy);
  background: var(--fill);
  padding: 13px 20px;
  border-radius: 7px 7px 0 0;
}
.hero-panel ul { list-style: none; padding: 8px 20px; margin: 0; }
.hero-panel li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}
.hero-panel li:last-child { border-bottom: 0; }
.hero-panel li .k { font-weight: 700; color: var(--ink); }
.hero-panel li .v { color: var(--ink-sub); text-align: right; }

/* ---------- Page banner (sub-pages) ---------- */
.page-banner {
  background: var(--bg-gray);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 44px;
}
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--blue); }
.crumbs span { color: var(--muted); }
.page-banner h1 {
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  color: var(--ink);
  margin-bottom: 10px;
}
.page-banner p { color: var(--ink-sub); margin: 0; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Service / feature cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
}
.card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.card-icon {
  flex: none;
  width: 50px; height: 50px;
  border-radius: var(--radius);
  background: var(--blue-soft);
  display: grid;
  place-items: center;
}
.card-icon svg { width: 26px; height: 26px; stroke: var(--blue); }
.card-no { font-size: .82rem; font-weight: 800; color: var(--blue); }
.card h3 { font-size: 1.18rem; color: var(--ink); margin-bottom: 10px; }
.card p { color: var(--ink-sub); font-size: .95rem; margin: 0; }

.tick-list { list-style: none; margin: 14px 0 0; padding: 0; }
.tick-list li {
  position: relative;
  padding: 9px 0 9px 26px;
  font-size: .93rem;
  color: var(--ink-sub);
  border-top: 1px solid var(--border);
}
.tick-list li:first-child { border-top: 0; }
.tick-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 1.05em;
  width: 12px; height: 7px;
  border-left: 2.5px solid var(--blue);
  border-bottom: 2.5px solid var(--blue);
  transform: rotate(-45deg);
}
.card-foot { margin-top: auto; padding-top: 16px; }

/* ---------- Link list (analysis menu) ---------- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.link-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
  background: #fff;
}
.link-row .lr-num {
  flex: none;
  font-weight: 800;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 6px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  font-size: .85rem;
}
.link-row .lr-title { font-weight: 700; color: var(--ink); font-size: 1rem; }
.link-row .lr-desc { font-size: .87rem; color: var(--muted); margin-top: 2px; }

/* ---------- Process steps ---------- */
.steps { counter-reset: step; border-top: 1px solid var(--border); }
.step {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.step-mark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.step-mark .lbl { font-size: .72rem; font-weight: 700; color: var(--blue); letter-spacing: .08em; }
.step-mark .no {
  width: 52px; height: 52px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--fill);
  color: var(--navy);
  display: grid; place-items: center;
  font-size: 1.3rem; font-weight: 800;
}
.step-body h3 { font-size: 1.12rem; color: var(--ink); margin-bottom: 6px; }
.step-body p { margin: 0; color: var(--ink-sub); font-size: .96rem; }
.step-body .note {
  margin-top: 10px;
  font-size: .87rem;
  color: var(--ink-sub);
  background: var(--blue-tint);
  border-left: 3px solid var(--blue);
  padding: 10px 14px;
}

/* ---------- Notice / callout ---------- */
.notice {
  background: var(--blue-tint);
  border: 1px solid var(--border);
  border-left: 5px solid var(--blue);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.notice h2 { font-size: 1.05rem; color: var(--ink); margin-bottom: 8px; }
.notice p { margin: 0; color: var(--ink-sub); font-size: .95rem; }

/* ---------- Info table ---------- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
}
.info-table th, .info-table td {
  text-align: left;
  padding: 17px 22px;
  border-bottom: 1px solid var(--border);
  font-size: .96rem;
  vertical-align: top;
}
.info-table tr:last-child th,
.info-table tr:last-child td { border-bottom: 0; }
.info-table th {
  width: 30%;
  background: var(--bg-gray);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}
.info-table td { color: var(--ink-sub); }

/* ---------- Profile ---------- */
.profile {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 34px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.profile-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.profile h3 { font-size: 1.3rem; color: var(--ink); }
.profile .role { color: var(--blue); font-weight: 700; font-size: .92rem; margin: 4px 0 14px; }
.profile p { color: var(--ink-sub); font-size: .96rem; }

/* ---------- Client list ---------- */
.client-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.client-list li {
  padding: 15px 22px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-sub);
  font-size: .96rem;
  background: #fff;
}
.client-list li:last-child { border-bottom: 0; }
.client-list li::before { content: "› "; color: var(--blue); font-weight: 700; }

/* ---------- News list ---------- */
.news-list {
  border-top: 1px solid var(--border);
}
.news-row {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 22px;
  align-items: start;
  padding: 24px 8px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.news-row:hover { background: var(--blue-tint); }
.news-meta { display: flex; flex-direction: column; gap: 8px; }
.news-date { font-size: .9rem; color: var(--muted); }
.news-cat {
  align-self: flex-start;
  font-size: .76rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--fill);
  border-radius: 4px;
  padding: 3px 11px;
}
.news-cat.cat-media { background: #c7e6d3; color: #14512f; }
.news-cat.cat-research { background: #ddd3f1; color: #3f2d6b; }
.news-body h3 { font-size: 1.05rem; color: var(--ink); margin-bottom: 6px; }
.news-body p { margin: 0; font-size: .92rem; color: var(--ink-sub); }
.news-row .news-arrow { color: var(--blue); font-size: 1.4rem; font-weight: 700; line-height: 1.4; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: start;
}
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 32px;
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: .94rem;
  color: var(--ink);
  margin-bottom: 7px;
}
.field .req {
  font-size: .7rem;
  color: #fff;
  background: #c0152e;
  border-radius: 4px;
  padding: 2px 7px;
  margin-left: 8px;
  vertical-align: 1px;
}
.field .opt {
  font-size: .72rem;
  color: var(--muted);
  margin-left: 8px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font);
  font-size: .98rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  background: #fff;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}
.field textarea { min-height: 150px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: .85rem; color: var(--muted); }
.agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .92rem;
  color: var(--ink-sub);
  margin: 6px 0 18px;
  cursor: pointer;
}
.agree input { width: auto; flex: none; margin-top: 7px; }
.form-msg {
  display: none;
  border: 1px solid #c0152e;
  background: #fdecee;
  color: #c0152e;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-weight: 700;
  font-size: .94rem;
  margin-bottom: 18px;
}
.form-msg.show { display: block; }

/* spam-trap field — visually hidden, off-screen */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-info {
  background: var(--bg-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.contact-info h2 { font-size: 1.15rem; color: var(--ink); margin-bottom: 14px; }
.contact-info dl { margin: 0; }
.contact-info dt {
  font-size: .78rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: .06em;
  margin-top: 18px;
}
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { margin: 4px 0 0; color: var(--ink-sub); font-size: .96rem; }

/* ---------- Policy ---------- */
.policy ol { padding-left: 1.4em; }
.policy ol > li { margin-bottom: 16px; color: var(--ink-sub); }
.policy .sub-list { list-style: none; padding-left: 0; margin: 10px 0 0; }
.policy .sub-list li { margin-bottom: 7px; }
.policy h2 { font-size: 1.15rem; color: var(--ink); margin: 32px 0 14px; }
.policy h2:first-of-type { margin-top: 28px; }
.policy ul.sub-list { list-style: disc; padding-left: 1.2em; color: var(--ink-sub); }
.policy ul.sub-list li { margin-bottom: 6px; }

/* ---------- CTA strip ---------- */
.cta {
  background: var(--fill);
  color: var(--navy);
  border: 1px solid var(--fill-hover);
  border-radius: var(--radius);
  padding: 44px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta h2 { font-size: clamp(1.3rem, 2.8vw, 1.7rem); margin-bottom: 6px; color: var(--navy); }
.cta p { margin: 0; color: #38527a; }
.cta .btn {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}
.cta .btn:hover { background: #fff; border-color: #b6cfe8; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-gray);
  border-top: 3px solid var(--fill-hover);
  padding: 54px 0 24px;
  font-size: .92rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.footer-brand p { color: var(--ink-sub); margin-top: 12px; max-width: 320px; }
.footer-col h3 {
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--ink);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--ink-sub); text-decoration: none; }
.footer-col a:hover { color: var(--blue); text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 20px;
  color: var(--muted);
  font-size: .84rem;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Misc ---------- */
.lead-block p { font-size: 1.05rem; color: var(--ink-sub); }
.divider { height: 1px; background: var(--border); margin: 50px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; padding: 56px 0; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; }
  .profile-photo { max-width: 200px; }
  .link-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .container { padding: 0 30px; }
  .section { padding: 54px 0; }
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 78px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 10px 16px 18px;
    transform: translateY(-130%);
    transition: transform .3s ease;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 14px 8px; border-bottom: 1px solid var(--border); }
  .nav a.active { border-bottom-color: var(--border); }
  .header-cta { display: none; }
  .brand-tag { display: none; }
  .lang-toggle button { padding: 7px 11px; font-size: .78rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .news-row { grid-template-columns: 1fr; gap: 10px; }
  .news-row .news-arrow { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .step { grid-template-columns: 64px 1fr; gap: 16px; }
  .step-mark .no { width: 44px; height: 44px; font-size: 1.1rem; }
  .cta { padding: 32px 26px; }
  .footer-top { grid-template-columns: 1fr; gap: 26px; }
}