*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --accent: #4f46e5;
  --accent-light: #eef2ff;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  background: var(--surface);
}

.label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--accent);
}

.desc {
  max-width: 480px;
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover {
  background: #4338ca;
  transform: translateY(-2px);
}

.by {
  margin-top: 28px;
  font-size: 14px;
  color: #9ca3af;
  letter-spacing: 1px;
}

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--border);
}

/* ===== MVC ===== */
.mvc {
  padding: 80px 24px;
  background: var(--bg);
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
}

.sec-head {
  text-align: center;
  margin-bottom: 56px;
}

.sec-head h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.sec-head p {
  color: var(--muted);
  font-size: 15px;
}

/* ===== STEPS ===== */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 64px;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-body {
  padding-bottom: 28px;
}

.step-body h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.step-body p {
  font-size: 14px;
  color: var(--muted);
}

.step-line {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin-left: 20px;
}

.tag {
  display: inline-block;
  margin-top: 8px;
  background: var(--accent-light);
  color: var(--accent);
  font-family: monospace;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
}

code {
  background: var(--accent-light);
  color: var(--accent);
  font-family: monospace;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ===== CARDS ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 64px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.card-top {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #fff;
}

.card-top.blue   { background: #3b82f6; }
.card-top.purple { background: #8b5cf6; }
.card-top.green  { background: #10b981; }

.card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}

.card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card ul li {
  font-size: 13px;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
}

.card ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #d1d5db;
}

/* ===== DIAGRAM ===== */
.diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
}

.diagram-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
}

.flow {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.fbox {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  min-width: 140px;
  border: 1px solid;
}

.fbox.browser  { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.fbox.ctrl     { background: #f5f3ff; border-color: #ddd6fe; color: #7c3aed; }
.fbox.model    { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }
.fbox.view     { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }
.fbox.db       { background: #fffbeb; border-color: #fde68a; color: #d97706; }

.farrow {
  color: #9ca3af;
  font-size: 16px;
}

.frow {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin: 4px 0;
}

.fcol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.farrow-s {
  font-size: 12px;
  color: #9ca3af;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: #9ca3af;
  font-size: 14px;
}

footer strong {
  color: var(--accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .hero h1 { font-size: 36px; }
  .frow { flex-direction: column; align-items: center; }
}
