/* ============================================================
   NemakiWare — section styles
   ============================================================ */

.card-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: 18px; font-weight: 500;
}
.dark .card-kicker { color: var(--accent-bright); }

/* ---- foundation (general principle) --------------------------- */
.pains-head {
  font-size: clamp(24px, 2.9vw, 34px);
  letter-spacing: -0.015em;
}
.pain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
.pain-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 28px 26px 58px;
}
.pain-mark {
  position: absolute; left: 20px; top: 10px;
  font-family: Georgia, "Hiragino Mincho ProN", serif;
  font-size: 44px; line-height: 1; color: var(--accent-strong);
}
.pain-card p { font-size: 16.5px; color: var(--ink-800); line-height: 1.65; font-weight: 500; }

.foundation-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.foundation-point {
  padding: 28px 26px 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.foundation-num {
  display: inline-block; font-size: 13px; color: var(--accent-strong);
  font-weight: 600; margin-bottom: 14px; letter-spacing: 0.04em;
}
.foundation-point h3 { font-size: 19px; margin-bottom: 10px; }
.foundation-point p { font-size: 15.5px; color: var(--ink-600); line-height: 1.58; }

/* ---- shift / RAG problem head --------------------------------- */
.shift-head .shift-intro {
  font-size: clamp(17px, 1.9vw, 21px);
  color: var(--accent-strong);
  font-weight: 500;
  line-height: 1.5;
  margin: 16px 0 4px;
  max-width: 60ch;
}
.shift-head h2 { margin-top: 14px; }

/* ---- glossary ------------------------------------------------- */
.glossary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.glossary-card {
  padding: 22px 22px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--accent-strong);
}
.glossary-term {
  font-size: 15px; font-weight: 600; color: var(--ink-900);
  margin-bottom: 11px; letter-spacing: 0.01em;
}
.glossary-def { font-size: 14px; color: var(--ink-600); line-height: 1.56; }

/* ---- shift (before/after) ------------------------------------- */
.shift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.shift-col { border-radius: var(--radius-lg); padding: 30px 30px 34px; border: 1px solid var(--line); background: var(--surface); }
.shift-col--before { background: var(--bg-tint); }
.shift-col--after { border-color: var(--teal-200); box-shadow: 0 24px 60px -40px oklch(0.5 0.08 210 / 0.5); }
.shift-tag {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em;
  color: var(--ink-500); margin-bottom: 18px;
}
.shift-tag--accent { color: var(--accent-strong); }
.shift-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.shift-list li { display: flex; gap: 13px; align-items: flex-start; font-size: 16px; color: var(--ink-700); line-height: 1.5; }
.shift-x { color: var(--ink-400); font-weight: 700; width: 18px; flex: none; text-align: center; }
.shift-check { color: var(--accent-strong); display: flex; flex: none; margin-top: 2px; }
.shift-col--after .shift-list li { color: var(--ink-800); }

/* ---- pillars -------------------------------------------------- */
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar-card h3 { font-size: 20px; margin-bottom: 10px; }
.pillar-card p { font-size: 15.5px; color: var(--ink-600); line-height: 1.58; }

/* ---- permission flow ------------------------------------------ */
.flow {
  display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap;
  margin-bottom: 56px;
}
.flow-node {
  flex: 1 1 0; min-width: 150px;
  background: var(--night-850); border: 1px solid var(--night-line);
  border-radius: 14px; padding: 22px 18px; text-align: center;
}
.flow-node--accent { border-color: oklch(0.6 0.09 200 / 0.55); background: oklch(0.4 0.06 205 / 0.22); }
.flow-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  margin: 0 auto 14px; background: oklch(0.42 0.06 205 / 0.3); color: var(--accent-bright); }
.flow-node--accent .flow-ic { background: var(--accent-bright); color: var(--night-900); }
.flow-label { font-family: var(--display); font-weight: 600; color: #fff; font-size: 15.5px; line-height: 1.3; }
.flow-sub { font-size: 11.5px; color: oklch(0.66 0.012 235); margin-top: 6px; }
.flow-arrow { display: flex; align-items: center; color: oklch(0.5 0.02 235); flex: none; }

.perm-points { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.perm-point { display: flex; gap: 16px; align-items: flex-start; padding: 22px; background: var(--night-850); border: 1px solid var(--night-line); border-radius: 14px; }
.perm-point-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: oklch(0.42 0.06 205 / 0.3); color: var(--accent-bright); }
.perm-point h4 { font-size: 17px; margin-bottom: 7px; }
.perm-point p { font-size: 14.5px; color: oklch(0.72 0.012 235); line-height: 1.55; }

/* ---- MCP ------------------------------------------------------ */
.mcp-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; }
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tool-list li { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.tool-list li:last-child { border-bottom: 0; }
.tool-name { font-family: var(--mono); font-size: 14px; color: var(--accent-strong); font-weight: 600; }
.tool-desc { font-size: 14.5px; color: var(--ink-600); }
.mcp-proto { margin-top: 16px; font-size: 12px; color: var(--ink-500); letter-spacing: 0.04em; }
.mcp-side { display: grid; gap: 22px; align-content: start; }
.rest-snippet {
  margin: 0; font-size: 12.5px; line-height: 1.75; color: var(--ink-700);
  background: var(--bg-tint); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px; white-space: pre-wrap; word-break: break-word;
}
.prov-row { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.prov-row:last-child { border-bottom: 0; padding-bottom: 0; }
.prov-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.prov-name { font-weight: 600; font-size: 15.5px; color: var(--ink-900); }
.prov-desc { font-size: 14px; color: var(--ink-600); line-height: 1.5; }

/* ---- lineage -------------------------------------------------- */
.lineage-diagram {
  display: grid; grid-template-columns: 1fr auto 1.1fr auto 1fr; gap: 18px; align-items: center;
  margin-top: 20px;
}
.lin-col { display: grid; gap: 10px; align-content: start; }
.lin-col-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: oklch(0.62 0.012 235); margin-bottom: 4px; }
.lin-chip {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: var(--night-850); border: 1px solid var(--night-line); border-radius: 11px;
  color: oklch(0.86 0.012 235); font-weight: 500; font-size: 15px;
}
.lin-chip svg { color: var(--accent-bright); flex: none; }
.lin-chip--out { border-color: oklch(0.55 0.08 200 / 0.45); }
.lin-flowarr { display: grid; place-items: center; color: var(--accent-bright); }
.lin-center {
  text-align: center; padding: 26px 22px; border-radius: 16px;
  background: linear-gradient(160deg, oklch(0.4 0.06 205 / 0.4), oklch(0.27 0.03 240 / 0.6));
  border: 1px solid oklch(0.6 0.08 200 / 0.5);
}
.lin-center-mark { display: flex; justify-content: center; margin-bottom: 12px; }
.lin-center-d { font-size: 11.5px; color: oklch(0.78 0.04 200); letter-spacing: 0.03em; }
.lineage-caption { margin-top: 30px; font-size: 13px; color: oklch(0.66 0.012 235); max-width: 70ch; }

/* ---- CMIS ----------------------------------------------------- */
.cmis-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.cmis-left .sec-head { margin-bottom: 28px; }
.cmis-bind { display: flex; flex-direction: column; gap: 12px; }
.cmis-bind-label { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); }
.cmis-bind-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.cmis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cmis-item {
  display: flex; align-items: center; gap: 12px; padding: 17px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  font-weight: 500; font-size: 15.5px; color: var(--ink-800);
}
.cmis-check { color: var(--accent-strong); display: flex; flex: none;
  width: 22px; height: 22px; border-radius: 50%; background: var(--teal-100); align-items: center; justify-content: center; }

/* ---- architecture --------------------------------------------- */
.arch { margin-bottom: 46px; }
.arch-row { display: flex; align-items: stretch; gap: 14px; justify-content: center; flex-wrap: wrap; }
.arch-box {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 20px 22px; border-radius: 14px; min-width: 150px;
  background: var(--surface); border: 1px solid var(--line);
}
.arch-box svg { color: var(--accent-strong); }
.arch-box span { font-weight: 600; font-size: 15.5px; color: var(--ink-900); }
.arch-box em { font-style: normal; font-size: 11px; color: var(--ink-500); letter-spacing: 0.03em; }
.arch-core { flex: 1 1 280px; max-width: 360px; border: 1.5px solid var(--teal-200); border-radius: 14px; overflow: hidden; background: var(--teal-100); }
.arch-ui { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px; font-size: 12px;
  color: var(--accent-strong); background: var(--surface); border-bottom: 1px solid var(--teal-200); }
.arch-core-main { padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.arch-core-main strong { font-family: var(--display); font-size: 19px; color: var(--ink-900); }
.arch-core-main em { font-style: normal; font-size: 11.5px; color: var(--ink-600); }
.arch-conn { display: grid; place-items: center; color: var(--ink-400); flex: none; }
.arch-down { display: flex; gap: 14px; justify-content: center; margin-top: 14px; }
.arch-down .arch-box { min-width: 200px; }

.stack-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }
.stack-table { width: 100%; border-collapse: collapse; }
.stack-table td { padding: 15px 4px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
.stack-table td:first-child { width: 34%; color: var(--ink-500); font-size: 13px; letter-spacing: 0.03em; }
.stack-table td:last-child { color: var(--ink-800); font-weight: 500; }
.stack-table tr:last-child td { border-bottom: 0; }
.auth-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.auth-list li { display: flex; align-items: center; gap: 11px; font-size: 15px; color: var(--ink-700); }

/* ---- quickstart ----------------------------------------------- */
.quick-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: start; }
.quick-steps { display: grid; gap: 14px; }
.quick-step { display: flex; gap: 18px; align-items: center; padding: 20px 22px;
  background: var(--night-850); border: 1px solid var(--night-line); border-radius: 13px; }
.quick-n { font-size: 14px; color: var(--accent-bright); font-weight: 600; flex: none; width: 26px; }
.quick-step-t { font-family: var(--display); font-weight: 600; color: #fff; font-size: 16px; margin-bottom: 6px; }
.quick-step-c { font-size: 12.5px; color: oklch(0.74 0.03 200); display: block; }
.quick-ports { background: var(--night-850) !important; }
.ports-table { width: 100%; border-collapse: collapse; }
.ports-table td { padding: 11px 0; border-bottom: 1px solid var(--night-line); font-size: 14px; }
.ports-table tr:last-child td { border-bottom: 0; }
.ports-s { color: #fff; font-weight: 600; }
.ports-p { color: var(--accent-bright); padding-left: 14px !important; width: 70px; }
.ports-d { color: oklch(0.72 0.012 235); text-align: right; font-size: 13px; }
.quick-license { text-align: center; margin-top: 40px; font-size: 12.5px; color: oklch(0.6 0.012 235); letter-spacing: 0.04em; }

/* ---- contact -------------------------------------------------- */
.contact-card {
  position: relative; overflow: hidden; border-radius: 26px;
  background: var(--night-900); color: #fff; padding: clamp(36px, 5vw, 70px);
}
.contact-glow {
  position: absolute; right: -10%; top: -30%; width: 620px; height: 620px;
  background: radial-gradient(circle at center, var(--accent-bright) 0%, transparent 60%);
  opacity: 0.18; pointer-events: none;
}
.contact-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.contact-lead .eyebrow { color: var(--accent-bright); }
.contact-lead .eyebrow::before { background: var(--accent-bright); }
.contact-lead h2 { color: #fff; font-size: clamp(28px, 3.6vw, 44px); margin-top: 16px; white-space: pre-line; }
.contact-lead p { color: oklch(0.78 0.012 235); margin-top: 18px; font-size: 17px; line-height: 1.6; }
.contact-services { display: grid; gap: 16px; }
.contact-service { padding: 20px 22px; border-radius: 13px; background: oklch(1 0 0 / 0.05); border: 1px solid oklch(1 0 0 / 0.1); }
.contact-service h4 { color: #fff; font-size: 16.5px; margin-bottom: 7px; }
.contact-service p { color: oklch(0.74 0.012 235); font-size: 14px; line-height: 1.5; }

/* ---- footer --------------------------------------------------- */
.footer { padding-block: 64px 30px; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 2fr; gap: 50px; padding-bottom: 44px; border-bottom: 1px solid var(--night-line); }
.footer-tagline { color: oklch(0.78 0.012 235); margin-top: 18px; font-size: 15.5px; max-width: 34ch; line-height: 1.55; }
.footer-etym { color: oklch(0.56 0.012 235); margin-top: 16px; font-size: 11.5px; max-width: 40ch; line-height: 1.6; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.footer-col { display: grid; gap: 12px; align-content: start; }
.footer-col-h { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: oklch(0.6 0.012 235); margin-bottom: 4px; }
.footer-col a { color: oklch(0.78 0.012 235); font-size: 14.5px; transition: color .15s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 26px; font-size: 13px; color: oklch(0.6 0.012 235); flex-wrap: wrap; }
.lang-toggle--dark { background: oklch(1 0 0 / 0.05); border-color: oklch(1 0 0 / 0.14); }
.lang-toggle--dark button { color: oklch(0.7 0.012 235); }
.lang-toggle--dark button.on { background: var(--accent-bright); color: var(--night-900); }

/* ---- responsive ----------------------------------------------- */
@media (max-width: 940px) {
  .shift-grid, .pillar-grid, .perm-points, .mcp-grid, .cmis-wrap, .stack-cols, .quick-grid, .contact-inner, .footer-inner { grid-template-columns: 1fr; }
  .pillar-grid { grid-template-columns: 1fr 1fr; }
  .foundation-points { grid-template-columns: 1fr; }
  .pain-grid { grid-template-columns: 1fr; }
  .glossary-grid { grid-template-columns: 1fr 1fr; }
  .lineage-diagram { grid-template-columns: 1fr; gap: 14px; }
  .lin-flowarr { transform: rotate(90deg); }
  .cmis-wrap { gap: 32px; }
}
@media (max-width: 640px) {
  .pillar-grid, .cmis-grid, .footer-cols { grid-template-columns: 1fr; }
  .glossary-grid { grid-template-columns: 1fr; }
  .flow-node { min-width: 100%; }
  .flow-arrow { transform: rotate(90deg); width: 100%; justify-content: center; }
  .arch-row, .arch-down { flex-direction: column; align-items: stretch; }
  .arch-conn { transform: rotate(90deg); }
}
