:root {
  --bg: #fbf8ff;
  --surface: #ffffff;
  --surface-strong: #f1ecff;
  --ink: #18131f;
  --muted: #625a70;
  --line: #ded6ea;
  --accent: #8b5cf6;
  --accent-strong: #5b35b1;
  --blue: #6574f7;
  --coral: #e879b8;
  --yellow: #f3bf5b;
  --shadow: 0 22px 70px rgba(53, 35, 84, 0.14);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(139, 92, 246, 0.09) 1px, transparent 1px),
    linear-gradient(180deg, #fffdf8 0%, var(--bg) 44rem);
  background-size: 56px 56px, auto;
  font-family:
    Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 0.08rem 0.32rem;
  border-radius: 5px;
  background: #f1ebff;
  color: var(--accent-strong);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(222, 214, 234, 0.8);
  background: rgba(251, 248, 255, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.top-nav {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.6rem);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.top-nav a:hover,
.project-card a:hover,
.contact-links a:hover {
  color: var(--accent);
}

.section-band {
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 3rem);
}

.hero {
  min-height: calc(100vh - 66px);
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 8% 18%, rgba(232, 121, 184, 0.2), transparent 24rem),
    radial-gradient(circle at 88% 18%, rgba(139, 92, 246, 0.2), transparent 28rem);
}

.hero-grid {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: block;
}

.hero-copy {
  max-width: 1040px;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 1.35rem;
  font-size: clamp(2.55rem, 5.4vw, 5.15rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-summary {
  max-width: 900px;
  color: #342d3f;
  font-size: clamp(1rem, 1.7vw, 1.16rem);
}

.intro-expanded {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  max-width: 1040px;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 1rem;
}

.intro-expanded p {
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.2rem;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-weight: 800;
}

.primary-action {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 14px 28px rgba(53, 35, 84, 0.18);
}

.secondary-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  color: var(--accent-strong);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
  max-width: 900px;
  margin: 2.2rem 0 0;
}

.hero-facts div {
  min-width: 0;
  border-top: 2px solid var(--ink);
  padding-top: 0.75rem;
}

.hero-facts dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-facts dd {
  margin: 0.2rem 0 0;
  font-weight: 900;
}

.hero-visual {
  min-width: 0;
}

.visual-shell {
  overflow: hidden;
  transform: rotate(1.5deg);
  border: 1px solid #d7cceb;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.visual-toolbar {
  display: flex;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #f2ecff;
}

.visual-toolbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b7a8d9;
}

.visual-body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.scan-panel,
.route-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffefe;
  padding: 1rem;
}

.scan-row {
  height: 12px;
  margin-bottom: 0.72rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #ded5ff);
}

.scan-row.wide {
  width: 88%;
}

.scan-row:not(.wide):not(.short) {
  width: 64%;
}

.scan-row.short {
  width: 42%;
}

.scan-metric {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-top: 1rem;
  color: var(--muted);
}

.scan-metric strong {
  color: var(--accent-strong);
  font-size: 2rem;
  line-height: 1;
}

.route-node,
.pipeline div,
.deploy-grid div,
.legacy-map div {
  border: 1px solid #d8cfee;
  border-radius: 12px;
  background: #fff;
  padding: 0.7rem;
  text-align: center;
  font-weight: 800;
}

.visual-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.visual-caption strong {
  color: var(--accent-strong);
}

.route-node.root {
  background: #eee7ff;
  color: var(--accent-strong);
}

.route-branches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  padding: 0.65rem 2.2rem 0.2rem;
}

.route-branches span {
  height: 22px;
  border-left: 2px solid #b7a8d9;
  border-bottom: 2px solid #b7a8d9;
}

.route-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.route-list div {
  border-radius: 6px;
  background: #f6f1ff;
  padding: 0.45rem;
  text-align: center;
}

.projects,
.cases {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding-top: clamp(3rem, 5vw, 5rem);
}

.section-heading {
  max-width: 720px;
  min-width: 0;
  margin-bottom: 2.4rem;
}

.section-heading h2,
.contact h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 1.2rem;
  min-height: 100%;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(53, 35, 84, 0.07);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--coral), var(--yellow));
}

.project-card-featured {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.14), transparent 45%),
    var(--surface);
}

.project-index,
.case-number {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.project-card h3 {
  margin-bottom: 0.15rem;
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
  line-height: 1.25;
}

.project-subtitle {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 800;
}

.project-card p:not(.project-index):not(.project-subtitle) {
  color: #3f374b;
}

.project-card a {
  align-self: end;
  color: var(--accent-strong);
  font-weight: 900;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-tags li {
  border: 1px solid #d7cceb;
  border-radius: 999px;
  background: #fbf8ff;
  padding: 0.28rem 0.62rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.cases {
  display: grid;
  gap: 0;
}

.case {
  min-width: 0;
  padding: clamp(1.8rem, 4.5vw, 4rem) 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

.cases > *,
.case > *,
.case-layout > *,
.case-content > * {
  min-width: 0;
}

.case-title {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  column-gap: 1.25rem;
  margin-bottom: 2rem;
}

.case-title .case-number {
  grid-row: span 2;
  margin: 0;
  padding-top: 0.2rem;
}

.case-title h3 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.7rem, 3.2vw, 2.65rem);
  line-height: 1.15;
}

.case-title p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.58fr);
  gap: clamp(1.2rem, 3vw, 2.5rem);
  align-items: start;
}

.case-content {
  display: grid;
  gap: 1rem;
}

.case-content section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.case-content section:last-child {
  border-bottom: 0;
}

.case h4 {
  margin-bottom: 0.45rem;
  color: var(--accent-strong);
  font-size: 1rem;
}

.case-content p {
  max-width: 760px;
  margin-bottom: 0;
  color: #3d3548;
}

.case-points {
  display: grid;
  gap: 0.5rem;
  max-width: 780px;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.case-points.compact {
  gap: 0.42rem;
}

.case-points li {
  position: relative;
  padding-left: 1.1rem;
}

.case-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 999px;
  background: var(--accent);
}

.case-visual {
  position: sticky;
  top: 6rem;
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid #d8cfee;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(243, 191, 91, 0.2), transparent 50%),
    var(--surface-strong);
  box-shadow: 0 12px 32px rgba(53, 35, 84, 0.07);
}

.flow-diagram {
  display: grid;
  gap: 0.75rem;
}

.flow-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.flow-node {
  min-height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #cfc1ea;
  border-radius: 12px;
  background: #fff;
  padding: 0.65rem;
  text-align: center;
  font-weight: 900;
}

.flow-node small,
.pipeline small,
.legacy-map small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
}

.flow-node.main {
  background: #eee7ff;
  color: var(--accent-strong);
}

.flow-node.muted {
  background: #fbf8ff;
  color: var(--muted);
}

.diagram-note {
  margin-top: 0.85rem;
  border-top: 1px solid rgba(139, 92, 246, 0.22);
  padding-top: 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.55;
}

.metric-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.metric-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: #fff;
}

.metric-table caption {
  padding: 0.9rem 1rem;
  color: var(--muted);
  text-align: left;
  font-weight: 800;
}

.metric-table th,
.metric-table td {
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--line);
  text-align: left;
}

.metric-table th {
  background: #f1ebff;
  color: var(--accent-strong);
}

.pipeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.38rem;
}

.pipeline span {
  width: 2px;
  height: 18px;
  margin: 0 auto;
  background: #b7a8d9;
}

.price-models {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.price-models span {
  border-radius: 999px;
  background: #fff;
  padding: 0.35rem 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.dark-visual {
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.32), transparent 48%),
    #21172f;
  color: #f5f0ff;
}

.dark-visual h4 {
  color: #eadfff;
}

.legacy-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.legacy-map div {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.dark-visual .diagram-note,
.dark-visual .legacy-map small {
  color: #d6c6f4;
}

.deploy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.deploy-map {
  display: grid;
  gap: 0.75rem;
}

.deploy-lane {
  display: grid;
  gap: 0.45rem;
  border: 1px solid #d8cfee;
  border-radius: 14px;
  background: #fff;
  padding: 0.75rem;
}

.deploy-lane strong {
  color: var(--accent-strong);
  font-size: 0.9rem;
}

.deploy-lane span {
  border-radius: 9px;
  background: #fbf8ff;
  padding: 0.45rem 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.deploy-grid div:nth-child(3),
.deploy-grid div:nth-child(4) {
  background: #eee7ff;
  color: var(--accent-strong);
}

.contact {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  width: min(100%, var(--max));
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.contact p {
  color: var(--muted);
}

.contact-links {
  display: grid;
  align-content: center;
  gap: 0.5rem;
  font-weight: 900;
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
  }

  .hero-grid,
  .case-layout,
  .project-list {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-width: 620px;
  }

  .case-visual {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    padding: 0.85rem 1rem;
  }

  .top-nav {
    gap: 0.7rem;
    font-size: 0.82rem;
  }

  .section-band {
    padding: 3rem 1rem;
  }

  h1 {
    font-size: 2.35rem;
  }

  .hero-summary,
  .intro-expanded,
  .case-content p,
  .project-card p,
  .case-points {
    font-size: 0.98rem;
    line-height: 1.72;
  }

  .intro-expanded {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
    justify-content: center;
  }

  .case {
    padding: 1rem;
  }

  .case-title {
    grid-template-columns: 1fr;
  }

  .case-title .case-number {
    grid-row: auto;
    margin-bottom: 0.25rem;
  }

  .flow-row,
  .legacy-map,
  .deploy-grid {
    grid-template-columns: 1fr;
  }

  .route-list {
    grid-template-columns: 1fr;
  }

  .route-branches {
    display: none;
  }

  .contact {
    display: grid;
  }
}
