:root {
  --ink: #222530;
  --ink-soft: #5b6472;
  --paper: #f6f8fc;
  --paper-2: #eef2fa;
  --line: #d7deec;
  --accent: #061f89;
  --accent-deep: #040f5c;
  --accent-soft: #dde3f6;
  --accent-2: #7446ce;
  --accent-2-soft: #ece4f9;
  --white: #ffffff;
  --radius: 14px;
  --maxw: 1080px;
  --shadow: 0 1px 2px rgba(6,31,137,.05), 0 8px 24px rgba(6,31,137,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }

h1, h2, h3 { font-family: 'Noto Sans', sans-serif; font-weight: 700; line-height: 1.14; letter-spacing: -.02em; }

.accent { color: var(--accent); }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: .98rem;
  padding: 13px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(14,124,134,.28); }
.btn-ghost { background: transparent; color: var(--accent-deep); border-color: var(--line); }
.btn-ghost:hover { background: var(--white); border-color: var(--accent); }
.btn:disabled { opacity: .55; cursor: progress; transform: none; box-shadow: none; }

/* ---- hero ---- */
.hero {
  background: linear-gradient(180deg, var(--white) 0%, var(--paper-2) 100%);
  border-bottom: 1px solid var(--line);
  padding: clamp(64px, 12vw, 132px) 0 clamp(56px, 9vw, 104px);
}
.hero .wrap { max-width: 880px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .76rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); margin-bottom: 26px; }
.lede { font-size: clamp(1.08rem, 2.2vw, 1.28rem); color: var(--ink-soft); max-width: 680px; margin-bottom: 36px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- sections ---- */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 14px; }
.section-sub { color: var(--ink-soft); font-size: 1.08rem; max-width: 660px; margin-bottom: 44px; }

/* ---- cards ---- */
.cards { display: grid; gap: 20px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: .96rem; }
.card-metric .metric {
  display: block;
  font-family: 'Noto Sans', sans-serif; font-weight: 700;
  font-size: 2.4rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 14px;
}

/* ---- timeline ---- */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.phase {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}
.phase-tag { display: block; font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-deep); margin-bottom: 16px; }
.phase ul { list-style: none; display: grid; gap: 12px; }
.phase li { position: relative; padding-left: 22px; color: var(--ink-soft); font-size: .96rem; }
.phase li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-soft); border: 2px solid var(--accent); }

/* ---- demo ---- */
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.demo-input, .demo-output {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.demo-input label { display: block; font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: 10px; }
#note {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  resize: vertical;
  line-height: 1.5;
}
#note:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.demo-controls { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.demo-output { display: flex; flex-direction: column; }
.demo-placeholder { margin: auto; text-align: center; color: var(--ink-soft); font-size: .95rem; max-width: 280px; }

.result { display: grid; gap: 18px; }
.result-block h4 { font-family: 'Noto Sans', sans-serif; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--accent-deep); margin-bottom: 7px; }
.result-block p, .result-block ul { color: var(--ink); font-size: .96rem; }
.result-block ul { padding-left: 18px; }
.result-block .codes { display: flex; flex-wrap: wrap; gap: 8px; }
.result-block .code-chip { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; font-size: .85rem; padding: 5px 11px; border-radius: 999px; }
.result-draft { background: var(--paper); border: 1px dashed var(--line); border-radius: 10px; padding: 14px; white-space: pre-wrap; font-size: .92rem; }

.spinner { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--ink-soft); }
.spinner .dot { width: 30px; height: 30px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-msg { margin: auto; text-align: center; color: #b4322a; font-size: .95rem; max-width: 300px; }

.disclaimer { margin-top: 22px; font-size: .86rem; color: var(--ink-soft); background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 14px 16px; }

/* ---- why ---- */
.why-text { font-size: clamp(1.1rem, 2.4vw, 1.32rem); color: var(--ink); margin-bottom: 22px; }
.why-text:last-child { margin-bottom: 0; }

/* ---- footer ---- */
.footer { background: var(--ink); color: #cdd9df; padding: 56px 0; text-align: center; }
.footer-meta { font-family: 'Noto Sans', sans-serif; font-weight: 700; font-size: 1.25rem; color: #fff; margin-bottom: 24px; }
.footer-links { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.footer-links a { color: #7fd4dc; text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-fine { font-size: .82rem; color: #6b8089; }

/* ---- microsoft stack: dashboard + architecture ---- */
.stack-dash {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 26px;
}
.dash-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.dash-title { font-family: 'Noto Sans', sans-serif; font-weight: 700; font-size: 1.2rem; }
.dash-tag { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi-tile { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.kpi-label { display: block; font-size: .8rem; color: var(--ink-soft); margin-bottom: 8px; }
.kpi-val { display: block; font-family: 'Noto Sans', sans-serif; font-weight: 700; font-size: 2rem; line-height: 1; color: var(--ink); }
.kpi-val small { font-family: 'Noto Sans', sans-serif; font-size: .8rem; color: var(--ink-soft); margin-left: 4px; }
.kpi-trend { display: block; margin-top: 8px; font-size: .8rem; font-weight: 600; }
.kpi-trend.down { color: #1a8a4a; }

.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.chart-label { display: block; font-size: .8rem; color: var(--ink-soft); margin-bottom: 14px; }
.bars { display: flex; align-items: flex-end; gap: 14px; height: 120px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.barfill { width: 100%; background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%); border-radius: 5px 5px 0 0; min-height: 4px; }
.bar-name { margin-top: 8px; font-size: .72rem; color: var(--ink-soft); }
.linechart { width: 100%; height: 120px; display: block; }
.line-area { fill: var(--accent-2-soft); stroke: none; opacity: .7; }
.line-stroke { fill: none; stroke: var(--accent-2); stroke-width: 2.5; vector-effect: non-scaling-stroke; }

.arch { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.arch-head { display: block; font-family: 'Noto Sans', sans-serif; font-weight: 700; font-size: 1.2rem; margin-bottom: 18px; }
.arch-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.node { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; font-size: .92rem; font-weight: 500; }
.node-phi { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.node-bi { border-color: var(--accent); background: var(--accent); color: #fff; }
.node-crm { border-color: #d8b24a; background: #fbf3da; color: #7a5b12; }
.arrow { color: var(--accent); font-weight: 700; }
.arch-note { font-size: .86rem; color: var(--ink-soft); margin: 14px 0 0; }
.boundary { position: relative; text-align: center; margin: 22px 0; border-top: 1px dashed var(--accent); }
.boundary span { position: relative; top: -10px; background: var(--white); padding: 0 12px; font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--accent-deep); font-weight: 600; }
.arch-tag { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: #7a5b12; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .demo { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .cards-4 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .hero-cta .btn, .demo-controls .btn { width: 100%; text-align: center; }
}
