/* ============= Design tokens ============= */
:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.19 0.061 293);
  --primary: oklch(0.49 0.29 282);
  --primary-foreground: oklch(0.984 0.003 247.858);
  --muted-foreground: oklch(0.52 0.027 293);
  --border: oklch(0.929 0.013 255.508);
  --notice: oklch(0.947 0.031 293);
  --soft-surface: oklch(0.978 0.008 293);
  --success: oklch(0.57 0.12 164);
  --illustration-foreground: oklch(1 0 0);
  --illustration-caption: oklch(1 0 0 / 75%);
  --illustration-border: oklch(1 0 0 / 30%);
}

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

[hidden] {
  display: none !important;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: "DM Sans", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

/* ============= Layout ============= */
.document-app {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.demo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #b45309;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  text-align: center;
}

.notice-band {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--notice);
  color: var(--foreground);
  font-size: 12px;
}

.site-header {
  width: min(1120px, calc(100% - 96px));
  margin: 0 auto;
  height: 103px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 26px;
  font-weight: 650;
  text-decoration: none;
  color: var(--foreground);
}

.wordmark img {
  height: 30px;
  width: auto;
}

.brand-dot {
  color: var(--primary);
  margin-left: -8px;
}

.header-caption {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-foreground);
  font-size: 12px;
}

/* ============= Document screens ============= */
.document-main {
  width: min(1120px, calc(100% - 96px));
  margin: 36px auto 62px;
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 92px;
  align-items: center;
  flex: 0;
}

.document-copy {
  max-width: 410px;
  padding: 16px 0;
}

.status-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 650;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.document-copy h1 {
  font-size: 56px;
  line-height: 1.08;
  font-weight: 450;
  margin: 23px 0 22px;
}

.document-copy h1 > span {
  color: var(--primary);
}

.intro-copy {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted-foreground);
  max-width: 350px;
  margin-bottom: 26px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 23px;
}

.file-icon {
  width: 42px;
  height: 46px;
  background: var(--soft-surface);
  color: var(--primary);
  display: grid;
  place-items: center;
  border-radius: 5px;
}

.file-icon .icon {
  width: 22px;
  height: 22px;
}

.file-row strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}

.file-row div > span {
  font-size: 11px;
  color: var(--muted-foreground);
}

.file-separator {
  margin: 0 6px;
}

.file-check {
  color: var(--success);
  margin-left: auto;
  width: 20px;
  height: 20px;
}

/* ============= Button ============= */
.document-cta {
  width: 100%;
  height: 53px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: 6px;
  gap: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--primary-foreground);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.document-cta:hover {
  opacity: 0.9;
}

.document-cta .icon {
  width: 18px;
  height: 18px;
}

.button-note {
  margin-top: 13px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.demo-notice {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #b45309;
}

/* ============= Next step ============= */
.next-step {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 35px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.next-step-icon {
  color: var(--muted-foreground);
  padding-top: 2px;
}

.next-step-icon .icon {
  width: 19px;
  height: 19px;
}

.next-step strong {
  font-size: 12px;
  font-weight: 550;
}

.next-step p {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-top: 5px;
  line-height: 1.6;
}

/* ============= Illustration ============= */
.document-visual {
  align-self: center;
  height: 570px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--primary);
}

.document-visual > img {
  height: 100%;
  width: 100%;
  position: absolute;
  object-fit: cover;
}

.visual-caption {
  position: absolute;
  bottom: 31px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--illustration-caption);
  font-size: 11px;
}

.visual-mini-mark {
  border: 1px solid var(--illustration-border);
  border-radius: 4px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--illustration-foreground);
}

/* ============= Loading / device-note screens ============= */
.loading-screen {
  flex: 1;
  min-height: 570px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 24px 100px;
}

.loading-logo {
  width: 170px;
  height: auto;
  margin-bottom: 26px;
}

.loading-screen h1 {
  font-size: 23px;
  font-weight: 500;
}

.loading-screen p {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-top: 10px;
}

.loading-track {
  width: 220px;
  height: 4px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--notice);
  margin-top: 30px;
}

.loading-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--primary);
  transform-origin: left;
  animation: prepare-document 3s linear forwards;
}

.loading-security {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted-foreground);
  margin-top: 18px;
}

@keyframes prepare-document {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.device-note-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 26px;
  border-radius: 14px;
  background: var(--soft-surface);
  color: var(--primary);
  display: grid;
  place-items: center;
}

.device-note-icon .icon {
  width: 26px;
  height: 26px;
}

.device-note-screen p {
  max-width: 380px;
  line-height: 1.7;
}

/* ============= Download-complete screen ============= */
.complete-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: 72px 24px 96px;
  max-width: 640px;
  margin: 0 auto;
  flex: 1;
}

.complete-screen h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

.complete-screen .intro-copy {
  margin: 0;
  max-width: 42ch;
}

.complete-badge {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  box-shadow: 0 12px 32px -8px color-mix(in oklch, var(--success) 55%, transparent);
}

.complete-screen .steps-guide {
  width: 100%;
  text-align: left;
  margin-top: 8px;
}

.steps-guide {
  margin-top: 35px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.steps-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.steps-guide ol {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.steps-guide li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--soft-surface);
  color: var(--primary);
  font-size: 14px;
  font-weight: 650;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.steps-guide li strong {
  font-size: 16px;
  font-weight: 600;
}

.steps-guide li p {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-top: 5px;
  line-height: 1.6;
}

/* ============= Footer ============= */
.site-footer {
  width: min(1120px, calc(100% - 96px));
  margin: auto auto 0;
  border-top: 1px solid var(--border);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.site-footer > span:last-child {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============= Responsive ============= */
@media (min-width: 1500px) {
  .document-main {
    flex: 0;
    margin-top: 60px;
    margin-bottom: 90px;
  }
}

@media (max-width: 1000px) {
  .document-main {
    gap: 44px;
    grid-template-columns: 1fr 1fr;
  }
  .document-copy h1 {
    font-size: 48px;
  }
  .document-visual {
    height: auto;
    aspect-ratio: 1;
  }
}

@media (max-width: 700px) {
  .notice-band {
    font-size: 10px;
    padding: 0 12px;
  }
  .site-header {
    width: calc(100% - 40px);
    height: 81px;
  }
  .wordmark {
    font-size: 23px;
  }
  .header-caption {
    font-size: 10px;
  }
  .document-main {
    width: calc(100% - 40px);
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 18px;
    margin-bottom: 34px;
  }
  .document-copy {
    max-width: none;
    padding: 0;
  }
  .document-copy h1 {
    font-size: 44px;
    margin-top: 20px;
  }
  .intro-copy {
    max-width: 360px;
    font-size: 14px;
  }
  .next-step {
    margin-top: 25px;
    padding-top: 20px;
  }
  .document-visual {
    height: auto;
    aspect-ratio: 1;
  }
  .visual-caption {
    bottom: 20px;
    font-size: 10px;
  }
  .site-footer {
    width: calc(100% - 40px);
    flex-wrap: wrap;
    padding: 21px 0;
  }
  .footer-note {
    display: none;
  }
  .loading-screen {
    min-height: 500px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-track span {
    animation: none;
    transform: scaleX(1);
  }
}
