:root {
  --ink: #121212;
  --paper: #f3f1eb;
  --surface: #ffffff;
  --line: #d8d5cd;
  --muted: #6e6b64;
  --accent: #ff5a36;
  --accent-soft: #ffe5dd;
  --dark: #171714;
  --lime: #d9ff57;
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, sans-serif;
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(243, 241, 235, 0.9);
  border-bottom: 1px solid rgba(18, 18, 18, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  color: white;
  background: var(--ink);
  border-radius: 50%;
  place-items: center;
  font-size: 12px;
}

.header-link {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.hero {
  min-height: calc(100svh - 75px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px clamp(20px, 8vw, 120px) 56px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 90, 54, 0.2), transparent 22%),
    linear-gradient(135deg, transparent 0 72%, rgba(18, 18, 18, 0.05) 72% 73%, transparent 73%);
}

.eyebrow,
.section-heading > span,
.conversion-card > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.hero h1 {
  max-width: 1050px;
  margin: 24px 0;
  font-size: clamp(52px, 8.5vw, 128px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.91;
}

.hero h1 span {
  color: var(--accent);
}

.hero > p {
  max-width: 680px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.65;
}

.primary-button,
.light-button {
  display: inline-flex;
  width: fit-content;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  color: white;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease;
}

.primary-button:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.hero-metrics {
  display: flex;
  gap: clamp(24px, 6vw, 80px);
  margin-top: 76px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-metrics div {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.hero-metrics strong {
  font-size: 38px;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: 110px clamp(20px, 8vw, 120px);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-heading h2,
.result-header h2,
.conversion-card h2 {
  margin: 12px 0;
  font-size: clamp(36px, 5vw, 68px);
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.section-heading p,
.result-header p,
.conversion-card p {
  color: var(--muted);
  line-height: 1.7;
}

.diagnosis-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(50px, 9vw, 140px);
  background: var(--surface);
}

.diagnosis-form {
  display: grid;
  gap: 22px;
}

.diagnosis-form label {
  display: grid;
  gap: 9px;
  font-size: 14px;
  font-weight: 800;
}

.diagnosis-form input:not([type="checkbox"]):not([type="file"]) {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  color: var(--ink);
  background: #f8f7f3;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
}

.diagnosis-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.file-field {
  position: relative;
  min-height: 86px;
  padding: 18px;
  border: 1px dashed #aaa69c;
  border-radius: 14px;
  cursor: pointer;
}

.file-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.consent {
  grid-template-columns: 18px 1fr !important;
  align-items: start;
  color: var(--muted);
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.5;
}

.consent input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.submit-button {
  width: 100%;
}

.form-error {
  min-height: 22px;
  margin: -10px 0 0;
  color: #b52910;
  font-size: 13px;
}

.analysis-section {
  min-height: 70svh;
  display: grid;
  background: var(--dark);
  place-items: center;
}

.analysis-card {
  max-width: 720px;
  color: white;
  text-align: center;
}

.analysis-card h2 {
  margin: 22px 0 38px;
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: -0.05em;
}

.loader {
  width: 70px;
  height: 70px;
  margin: 0 auto 30px;
  border: 6px solid #3a3a35;
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-list {
  display: grid;
  gap: 10px;
  max-width: 480px;
  margin: auto;
  padding: 0;
  list-style: none;
}

.progress-list li {
  padding: 14px 18px;
  color: #96968f;
  border: 1px solid #363631;
  border-radius: 12px;
  text-align: left;
  transition: 200ms ease;
}

.progress-list li.is-active {
  color: var(--dark);
  background: var(--lime);
  border-color: var(--lime);
  font-weight: 800;
}

.result-section {
  background: var(--paper);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 68px;
}

.result-header > div:first-child {
  max-width: 760px;
}

.score-ring {
  flex: 0 0 210px;
  width: 210px;
  height: 210px;
  display: grid;
  align-content: center;
  justify-items: center;
  background: conic-gradient(var(--accent) 75%, #d9d6cf 0);
  border: 18px solid var(--surface);
  border-radius: 50%;
  box-shadow: inset 0 0 0 32px var(--paper);
}

.score-ring strong {
  font-size: 62px;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

.score-ring span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.score-ring em {
  margin-top: 7px;
  font-style: normal;
  font-weight: 900;
}

.result-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.panel {
  padding: clamp(24px, 4vw, 42px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.panel-heading h3,
.chat-intro h3 {
  margin: 4px 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.panel-heading > span {
  color: var(--muted);
  font-size: 12px;
}

.category {
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.category-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.category-meta strong {
  font-size: 14px;
}

.category-meta span {
  font-weight: 900;
}

.score-track {
  height: 8px;
  overflow: hidden;
  background: #ebe9e3;
  border-radius: 10px;
}

.score-track i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.category p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.priority-item {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.priority-item b {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 8px;
  color: #b52910;
  background: var(--accent-soft);
  border-radius: 6px;
  font-size: 11px;
}

.priority-item h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.priority-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.faq-panel {
  margin-top: 20px;
}

.faq-item {
  border-top: 1px solid var(--line);
}

.faq-item button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-weight: 800;
}

.faq-item button span {
  color: var(--accent);
  font-size: 22px;
}

.faq-answer {
  display: none;
  max-width: 800px;
  margin: -4px 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.faq-item.is-open .faq-answer {
  display: block;
}

.chat-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(30px, 6vw, 90px);
  align-items: center;
  margin-top: 20px;
  padding: clamp(28px, 6vw, 76px);
  color: white;
  background: var(--dark);
  border-radius: var(--radius);
}

.chat-intro p {
  color: #aaa9a2;
  line-height: 1.7;
}

.chat-window {
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border-radius: 18px;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.chat-status > span:last-child {
  margin-left: auto;
  color: var(--muted);
}

.online-dot {
  width: 8px;
  height: 8px;
  background: #2ac769;
  border-radius: 50%;
}

.messages {
  height: 330px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 20px;
}

.message {
  max-width: 84%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
}

.message.bot {
  align-self: flex-start;
  background: #eeece6;
  border-bottom-left-radius: 4px;
}

.message.user {
  align-self: flex-end;
  color: white;
  background: var(--accent);
  border-bottom-right-radius: 4px;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.chat-form input {
  min-width: 0;
  padding: 0 14px;
  background: #f4f2ed;
  border: 0;
  border-radius: 10px;
  outline: none;
}

.chat-form button {
  height: 48px;
  color: white;
  background: var(--ink);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 22px;
}

.conversion-card {
  margin-top: 20px;
  padding: clamp(36px, 7vw, 90px);
  color: white;
  background: var(--accent);
  border-radius: var(--radius);
}

.conversion-card > span,
.conversion-card p {
  color: #ffe7e0;
}

.conversion-card h2 {
  max-width: 900px;
}

.light-button {
  margin-top: 16px;
  color: var(--ink);
  background: white;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(20px, 8vw, 120px);
  color: #aaa9a2;
  background: var(--dark);
  font-size: 12px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .diagnosis-section,
  .result-grid,
  .chat-panel {
    grid-template-columns: 1fr;
  }

  .result-header {
    align-items: flex-start;
  }

  .score-ring {
    flex-basis: 170px;
    width: 170px;
    height: 170px;
  }

  .chat-intro {
    max-width: 600px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 18px;
  }

  .header-link {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 80px 20px 50px;
  }

  .hero h1 {
    font-size: clamp(48px, 15vw, 76px);
  }

  .hero-metrics {
    gap: 18px;
    justify-content: space-between;
    margin-top: 54px;
  }

  .hero-metrics div {
    display: grid;
    gap: 2px;
  }

  .hero-metrics strong {
    font-size: 29px;
  }

  .section {
    padding: 74px 20px;
  }

  .result-header {
    display: grid;
  }

  .score-ring {
    justify-self: center;
  }

  .panel {
    padding: 24px 18px;
    border-radius: 16px;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .messages {
    height: 300px;
  }

  footer {
    flex-direction: column;
    padding: 26px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .loader {
    animation: none;
  }
}

