/* ===================================================================
   QUANTORA DATA SYSTEMS - Shared Stylesheet
   =================================================================== */

:root {
  --bg: #ffffff;
  --bg-secondary: #f3f5f8;
  --bg-subtle: #e7ecf2;
  --navy: #1b2a4a;
  --navy-deep: #12203a;
  --slate: #5c6775;
  --slate-light: #808a97;
  --indigo: #4a5a9e;
  --indigo-dark: #3a4780;
  --teal: #3f8f8c;
  --border: #dfe4ea;
  --white: #ffffff;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 2px 18px rgba(27, 42, 74, 0.07);
  --shadow-lg: 0 8px 32px rgba(27, 42, 74, 0.12);
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "Meiryo", sans-serif;
  color: var(--navy);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--indigo-dark); text-decoration: underline; }
ul { padding-left: 1.3em; }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  color: var(--navy);
  line-height: 1.4;
  font-weight: 700;
  margin: 0 0 0.6em;
}
.hs-3.hs-3,.hs-4.hs-4{
  color: var(--navy);
  line-height: 1.4;
  font-weight: 700;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; }
.hs-3.hs-3{ font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--navy); }
.lead { font-size: 1.1rem; color: var(--slate); }

.text-muted { color: var(--slate); }
.center { text-align: center; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.05rem; letter-spacing: 0.03em;
  color: var(--navy); white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--navy); }
.brand .logo-icon { flex-shrink: 0; }
.brand-text { font-size: 1rem; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.nav-menu { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
  color: var(--navy); font-size: 0.93rem; font-weight: 500;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.nav-menu a:hover, .nav-menu a[aria-current="page"] {
  color: var(--indigo); border-bottom-color: var(--teal); text-decoration: none;
}
.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 42px; height: 38px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--navy); position: relative; transition: 0.2s;
}
.nav-toggle span::before { content: ""; position: absolute; top: -6px; }
.nav-toggle span::after { content: ""; position: absolute; top: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: 1px solid transparent; transition: 0.15s; text-decoration: none;
  line-height: 1.2;
}
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-dark); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); text-decoration: none; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: #336f6d; color: #fff; text-decoration: none; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg) 100%);
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
}
.hero-eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--teal); text-transform: uppercase; margin-bottom: 14px;
}
.hero h1 { margin-bottom: 20px; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-visual img {
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4/3; object-fit: cover;
}
.hero-visual .diagram-chip {
  position: absolute; bottom: -18px; left: -18px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); font-size: 0.82rem;
  display: flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 600;
}
.diagram-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }

/* ---------- Page header (sub pages) ---------- */
.page-header {
  background: var(--bg-secondary); padding: 48px 0 40px; border-bottom: 1px solid var(--border);
}
.breadcrumb { font-size: 0.85rem; color: var(--slate); margin-bottom: 14px; }
.breadcrumb a { color: var(--slate); }
.page-header h1 { margin-bottom: 10px; }
.page-header .lead { max-width: 760px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-secondary); }
.section-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.section-head.left { text-align: left; margin: 0 0 40px; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--indigo); text-transform: uppercase; margin-bottom: 10px;
}

/* ---------- Grid & Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 10px; }
.card .hs-3{ margin-bottom: 10px; }
.card .icon-badge { margin-bottom: 16px; }
.card ul { margin: 10px 0 0; padding-left: 1.2em; color: var(--slate); font-size: 0.93rem; }
.card ul li { margin-bottom: 6px; }

.icon-badge {
  width: 52px; height: 52px; border-radius: 12px; background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-badge svg { width: 26px; height: 26px; stroke: var(--indigo); fill: none; stroke-width: 1.7; }

.media-card { overflow: hidden; padding: 0; }
.media-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.media-card .media-body { padding: 24px; }

.challenge-card { display: flex; gap: 16px; align-items: flex-start; }
.challenge-card .icon-badge { background: #eef1fb; }

.feature-row {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: center;
  padding: 48px 0; border-bottom: 1px solid var(--border);
}
.feature-row:last-child { border-bottom: none; }
.feature-row.reverse { grid-template-columns: 1.1fr 0.9fr; }
.feature-row.reverse .feature-media { order: 2; }
.feature-media img {
  border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover;
}
.feature-text h3 { font-size: 1.4rem; }
.feature-text .hs-3{ font-size: 1.4rem; }
.feature-text .tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag {
  background: var(--bg-subtle); color: var(--indigo); font-size: 0.8rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
}

/* ---------- Table ---------- */
.data-table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 0.94rem; }
.data-table th, .data-table td {
  border: 1px solid var(--border); padding: 12px 14px; text-align: left; vertical-align: top;
}
.data-table th { background: var(--bg-secondary); color: var(--navy); font-weight: 700; }
.data-table tr:nth-child(even) td { background: #fafbfc; }

/* ---------- Process diagram ---------- */
.process-diagram {
  display: flex; justify-content: space-between; gap: 8px; margin: 40px 0; position: relative;
}
.process-diagram::before {
  content: ""; position: absolute; top: 28px; left: 4%; right: 4%; height: 2px;
  background: var(--border); z-index: 0;
}
.process-step { flex: 1; text-align: center; position: relative; z-index: 1; }
.process-step .step-node {
  width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 2px solid var(--indigo);
  color: var(--indigo); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; margin: 0 auto 14px;
}
.process-step .step-node.teal { border-color: var(--teal); color: var(--teal); }
.process-step h3 { font-size: 0.98rem; margin-bottom: 8px; }
.process-step .hs-3{ font-size: 0.98rem; margin-bottom: 8px; }
.process-step p { font-size: 0.85rem; color: var(--slate); }

.process-list { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.process-list li {
  counter-increment: step; position: relative; padding: 24px 0 24px 64px; border-bottom: 1px solid var(--border);
}
.process-list li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 22px;
  width: 44px; height: 44px; border-radius: 50%; background: var(--bg-subtle); color: var(--indigo);
  font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; justify-content: center;
}

/* ---------- Timeline (vertical, mobile) ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative; padding: 0 0 32px 32px; border-left: 2px solid var(--border);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--teal); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--teal);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: 48px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { color: #c7cde0; margin: 0; }
.cta-band .btn-outline { color: #fff; border-color: rgba(255,255,255,0.4); }
.cta-band .btn-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); }

/* ---------- Forms ---------- */
.form-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px; box-shadow: var(--shadow);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.form-group .req { color: #c0392b; margin-left: 4px; font-size: 0.8rem; font-weight: 700; }
.form-group .opt { color: var(--slate); margin-left: 4px; font-size: 0.78rem; font-weight: 500; }
.form-group .hint { font-size: 0.8rem; color: var(--slate); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
input, select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.95rem; font-family: inherit; color: var(--navy); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--indigo); outline-offset: 1px; border-color: var(--indigo); }
textarea { min-height: 130px; resize: vertical; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-row input { width: auto; margin-top: 4px; }
.checkbox-row label { font-weight: 400; font-size: 0.88rem; }
.field-error { color: #c0392b; font-size: 0.8rem; margin-top: 4px; display: none; }
.form-group.invalid input, .form-group.invalid select, .form-group.invalid textarea { border-color: #c0392b; }
.form-group.invalid .field-error { display: block; }
.form-status {
  margin-top: 18px; padding: 14px 16px; border-radius: 8px; font-size: 0.9rem; display: none;
}
.form-status.show { display: block; }
.form-status.success { background: #eaf7ee; color: #1f6d3b; border: 1px solid #bfe6cb; }
.form-status.error { background: #fdecea; color: #a12d22; border: 1px solid #f3c6c1; }
.form-status.loading { background: var(--bg-subtle); color: var(--slate); }
.honeypot-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; }

/* ---------- Sidebar / info box ---------- */
.info-box { background: var(--bg-subtle); border-radius: var(--radius); padding: 22px; font-size: 0.9rem; }
.info-box h4 { font-size: 0.95rem; margin-bottom: 10px; }
.info-box .hs-4{ font-size: 0.95rem; margin-bottom: 10px; }
.contact-detail-list { list-style: none; padding: 0; margin: 0; }
.contact-detail-list li { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.contact-detail-list li:last-child { border-bottom: none; }
.contact-detail-list .icon-badge { width: 40px; height: 40px; }
.contact-detail-list svg { width: 20px; height: 20px; }

/* ---------- Articles / Insights ---------- */
.article-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.article-card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.article-card .article-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.article-category {
  font-size: 0.75rem; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.article-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.article-card .hs-3{ font-size: 1.05rem; margin-bottom: 10px; }
.article-card p { font-size: 0.9rem; color: var(--slate); flex: 1; }
.article-meta { font-size: 0.8rem; color: var(--slate-light); margin-top: 10px; }

.article-content { max-width: 760px; margin: 0 auto; }
.article-content h2 { margin-top: 1.8em; font-size: 1.35rem; }
.article-content h3 { margin-top: 1.4em; font-size: 1.1rem; }
.article-content .hs-3{ margin-top: 1.4em; font-size: 1.1rem; }
.article-content img { border-radius: var(--radius-lg); margin: 1.6em 0; box-shadow: var(--shadow); }
.article-hero-image { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 2em; }

.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-tabs a {
  padding: 7px 16px; border-radius: 999px; background: var(--bg-subtle); color: var(--navy);
  font-size: 0.85rem; font-weight: 600;
}
.filter-tabs a:hover, .filter-tabs a.active { background: var(--indigo); color: #fff; text-decoration: none; }

/* ---------- Accordion (FAQ-like use case) ---------- */
.usecase-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; background: #fff; }
.usecase-card .usecase-tag { font-size: 0.78rem; color: var(--teal); font-weight: 700; margin-bottom: 8px; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #c7cde0; padding: 64px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 40px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; margin-bottom: 14px; }
.footer-desc { font-size: 0.88rem; color: #9aa4bd; margin-bottom: 18px; }
.footer-col h4 { color: #fff; font-size: 0.88rem; letter-spacing: 0.04em; margin-bottom: 16px; text-transform: uppercase; }
.footer-col .hs-4{ color: #fff; font-size: 0.88rem; letter-spacing: 0.04em; margin-bottom: 16px; text-transform: uppercase; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-col a { color: #c7cde0; }
.footer-col a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 8px; font-size: 0.88rem; color: #c7cde0; align-items: flex-start; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; font-size: 0.82rem; color: #8089a3;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.footer-bottom a { color: #8089a3; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 100px 0; }
.error-code { font-size: 5rem; font-weight: 800; color: var(--indigo); margin: 0; letter-spacing: 0.05em; }

/* ---------- Legal content ---------- */
.legal-content h2 { margin-top: 2em; font-size: 1.2rem; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.legal-content h3 { margin-top: 1.3em; font-size: 1.02rem; }
.legal-content .hs-3{ margin-top: 1.3em; font-size: 1.02rem; }
.legal-content ol, .legal-content ul { color: var(--navy); }
.legal-content { max-width: 820px; margin: 0 auto; }
.legal-meta { color: var(--slate); font-size: 0.85rem; margin-bottom: 2em; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .process-diagram { display: none; }
}

@media (max-width: 720px) {
  .main-nav { position: fixed; inset: 64px 0 0 0; background: #fff; flex-direction: column;
    align-items: flex-start; padding: 24px; gap: 24px; transform: translateX(100%);
    transition: transform 0.25s ease; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .nav-menu { flex-direction: column; align-items: flex-start; gap: 18px; width: 100%; }
  .nav-menu a { display: block; width: 100%; font-size: 1rem; }
  .header-actions { flex-direction: column; align-items: flex-start; width: 100%; gap: 14px; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; }
  .challenge-card { flex-direction: column; }
}
