:root {
  --paper: #f5f1e4;
  --surface: #fffdf7;
  --ink: #161812;
  --muted: #65675f;
  --line: #c9c5b8;
  --acid: #b8f23f;
  --coral: #ff684f;
  --blue: #2458d3;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR",
    "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 max(24px, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(245, 241, 228, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--ink);
  color: var(--acid);
  font-size: 17px;
}

.site-header nav {
  display: flex;
  gap: 26px;
  font-size: 14px;
  font-weight: 700;
}

.site-header nav a {
  padding: 10px 0;
  border-bottom: 2px solid transparent;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  border-color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(430px, 0.98fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: center;
  width: min(calc(100% - 48px), var(--max-width));
  min-height: calc(100svh - 72px);
  margin: 0 auto;
  padding: 58px 0 74px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(48px, 6vw, 79px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero h1 span {
  padding: 0 0.08em;
  background: var(--acid);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-intro {
  max-width: 590px;
  margin: 28px 0 0;
  color: #3c3e38;
  font-size: 19px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.button-primary {
  background: var(--ink);
  color: white;
}

.button-secondary {
  background: transparent;
}

.capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.capability-list li {
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.signal-board {
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  box-shadow: 13px 13px 0 var(--coral);
}

.signal-header {
  display: flex;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid #4a4d43;
  color: #c5c8bd;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.signal-header span:first-child {
  color: var(--acid);
}

.signal-header i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--acid);
  animation: pulse 1.8s ease-in-out infinite;
}

.query-block,
.response-block {
  padding: 24px;
}

.query-label {
  color: #9da193;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.query-block p,
.response-block p {
  margin: 7px 0 0;
  font-size: 17px;
  line-height: 1.55;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  border-top: 1px solid #4a4d43;
  border-bottom: 1px solid #4a4d43;
  list-style: none;
}

.pipeline li {
  min-width: 0;
  padding: 17px 12px;
  border-right: 1px solid #4a4d43;
}

.pipeline li:last-child { border-right: 0; }

.pipeline span,
.pipeline small {
  display: block;
  color: #8f9386;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.pipeline strong {
  display: block;
  overflow-wrap: anywhere;
  margin: 8px 0 2px;
  color: var(--acid);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.response-block {
  background: #22251d;
}

.privacy-note {
  display: inline-block;
  margin-top: 14px;
  color: #9da193;
  font-size: 11px;
}

.section {
  border-top: 1px solid var(--line);
  padding: 108px max(24px, calc((100vw - var(--max-width)) / 2));
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px 70px;
  align-items: end;
  margin-bottom: 54px;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(37px, 4.5vw, 60px);
  line-height: 1.12;
}

.section-heading > p:last-child {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.case-study {
  border-top: 4px solid var(--ink);
  background: var(--surface);
}

.case-study + .case-study {
  margin-top: 68px;
}

.case-header {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  padding: 38px;
  border-bottom: 1px solid var(--line);
}

.case-number {
  margin: 0 0 12px;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
}

.case-header h3 {
  margin: 0;
  font-size: clamp(29px, 3vw, 43px);
  line-height: 1.2;
}

.case-summary {
  margin: 0;
  color: #464840;
  font-size: 17px;
}

.case-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.case-columns section {
  padding: 30px 28px 34px;
  border-right: 1px solid var(--line);
}

.case-columns section:last-child { border-right: 0; }

.case-columns h4,
.worklog h4 {
  margin: 0 0 14px;
  font-size: 18px;
}

.case-columns ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.case-columns li + li {
  margin-top: 9px;
}

.architecture {
  display: grid;
  gap: 14px;
  padding: 34px 38px;
  background: var(--paper);
}

.architecture-lane {
  display: grid;
  grid-template-columns: 100px 1fr 28px 1fr 28px 1fr;
  align-items: center;
  gap: 8px;
}

.architecture-lane div {
  padding: 13px 12px;
  border: 1px solid var(--ink);
  background: var(--surface);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.architecture-lane b {
  text-align: center;
}

.lane-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
}

.case-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 38px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.case-footer p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
}

.case-footer span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: right;
}

.case-study-evidence {
  border-top-color: var(--blue);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.metrics div {
  padding: 26px 28px 30px;
  border-right: 1px solid var(--line);
}

.metrics div:last-child { border-right: 0; }

.metrics dt {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.metrics dd {
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 850;
  line-height: 1.1;
}

.metrics small {
  margin-left: 4px;
  color: var(--blue);
  font-size: 12px;
}

.worklog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.worklog section {
  padding: 34px 28px 38px;
  border-right: 1px solid var(--line);
}

.worklog section:last-child {
  border-right: 0;
}

.worklog span {
  display: block;
  margin-bottom: 18px;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
}

.worklog p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.approach {
  background: var(--ink);
  color: white;
}

.approach .section-heading {
  grid-template-columns: 1fr;
}

.approach .eyebrow {
  color: var(--acid);
}

.approach-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0;
  padding: 0;
  border-top: 1px solid #505348;
  list-style: none;
}

.approach-list li {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  padding: 32px 28px 36px 0;
  border-bottom: 1px solid #505348;
}

.approach-list li:nth-child(odd) {
  border-right: 1px solid #505348;
}

.approach-list li:nth-child(even) {
  padding-left: 28px;
}

.approach-list > li > span {
  color: var(--acid);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.approach-list h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.approach-list p {
  margin: 0;
  color: #b8bcb0;
}

.contact {
  padding: 110px max(24px, calc((100vw - var(--max-width)) / 2));
  background: var(--coral);
}

.contact .eyebrow {
  color: var(--ink);
}

.contact h2 {
  max-width: 950px;
  margin: 0;
  font-size: clamp(39px, 5.5vw, 72px);
  line-height: 1.12;
}

.contact > p:not(.eyebrow) {
  margin: 26px 0 32px;
  font-size: 18px;
}

.button-light {
  background: var(--surface);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px max(24px, calc((100vw - var(--max-width)) / 2));
  background: var(--ink);
  color: #b8bcb0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 70px 0 90px;
  }

  .signal-board {
    max-width: 650px;
  }

  .section-heading,
  .case-header {
    grid-template-columns: 1fr;
  }

  .case-columns,
  .metrics,
  .worklog {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-columns section:nth-child(2),
  .metrics div:nth-child(2),
  .worklog section:nth-child(2) {
    border-right: 0;
  }

  .case-columns section:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .metrics div:nth-child(n + 3),
  .worklog section:nth-child(3) {
    border-top: 1px solid var(--line);
  }

  .worklog section:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  body {
    word-break: normal;
  }

  .site-header {
    min-height: 62px;
    padding-inline: 16px;
  }

  .brand span:last-child,
  .site-header nav a:nth-child(2) {
    display: none;
  }

  .site-header nav {
    gap: 18px;
    font-size: 13px;
  }

  .hero {
    width: min(calc(100% - 32px), var(--max-width));
    gap: 50px;
    padding-top: 52px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero-intro {
    font-size: 17px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .signal-board {
    box-shadow: 8px 8px 0 var(--coral);
  }

  .signal-header {
    gap: 16px;
  }

  .pipeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .pipeline li:nth-child(2) {
    border-right: 0;
  }

  .pipeline li:nth-child(n + 3) {
    border-top: 1px solid #4a4d43;
  }

  .section,
  .contact {
    padding: 82px 16px;
  }

  .section-heading {
    margin-bottom: 38px;
  }

  .case-header {
    gap: 24px;
    padding: 28px 20px;
  }

  .case-columns,
  .metrics,
  .worklog,
  .approach-list {
    grid-template-columns: 1fr;
  }

  .case-columns section,
  .metrics div,
  .worklog section {
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .case-columns section:first-child,
  .metrics div:first-child,
  .worklog section:first-child {
    border-top: 0;
  }

  .case-columns section:last-child,
  .worklog section:last-child {
    grid-column: auto;
  }

  .architecture {
    padding: 28px 20px;
  }

  .architecture-lane {
    grid-template-columns: 1fr;
  }

  .architecture-lane b {
    transform: rotate(90deg);
  }

  .lane-label {
    margin-top: 12px;
    color: var(--blue);
  }

  .case-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 20px;
  }

  .case-footer span {
    text-align: left;
  }

  .approach-list li,
  .approach-list li:nth-child(even) {
    padding: 28px 0;
    border-right: 0;
  }

  .contact h2 br {
    display: none;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-inline: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
