/* OpenSolve shared styles (home + guide). Design source: docs/sample-home.html */

html, body { background: #F6F5F1; }
:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --ink: #102A43;
  --muted: #52606D;
  --faint: #7B8794;
  --line: rgba(16, 42, 67, .10);
  --accent: #1D5FD1;
  --accent-ink: #FFFFFF;
  --accent-soft: #EAF1FC;
  --ok: #16855B;
  --ok-soft: #E7F5EE;
  --shadow: 0 1px 2px rgba(16,42,67,.06), 0 12px 32px rgba(16,42,67,.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1724;
    --surface: #122233;
    --ink: #E6EDF5;
    --muted: #A3B2C2;
    --faint: #8494A6;
    --line: rgba(230, 237, 245, .10);
    --accent: #6FA4FF;
    --accent-ink: #0B1724;
    --accent-soft: rgba(111, 164, 255, .14);
    --ok: #4CC38A;
    --ok-soft: rgba(76, 195, 138, .14);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 16px 40px rgba(0,0,0,.35);
  }
  html, body { background: #0B1724; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
::selection { background: var(--accent-soft); }
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section[id] { scroll-margin-top: 24px; }

/* ---------- nav ---------- */
.top { position: relative; z-index: 20; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.wordmark { font-weight: 700; font-size: 21px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .ext { display: inline-flex; align-items: center; gap: 4px; }
.burger {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; position: relative; z-index: 60;
}
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
.burger span:nth-child(1) { top: 15px; } .burger span:nth-child(2) { top: 21px; } .burger span:nth-child(3) { top: 27px; }
body.menu-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  padding: 100px 24px 40px; display: flex; flex-direction: column;
}
.menu[hidden] { display: none; }
.menu a {
  font-size: 22px; font-weight: 700; color: var(--ink); text-decoration: none;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  animation: linkIn .45s var(--ease) both; animation-delay: calc(var(--i) * 50ms + 60ms);
}
@keyframes linkIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- buttons, chips, icons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 26px; border-radius: 12px;
  font: inherit; font-size: 16.5px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .2s, color .2s, box-shadow .2s, border-color .2s, transform .15s;
}
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(16,42,67,.12), 0 6px 16px rgba(29,95,209,.22); }
.btn-solid:hover { box-shadow: 0 1px 2px rgba(16,42,67,.12), 0 10px 24px rgba(29,95,209,.32); }
.btn-solid svg { transition: transform .3s var(--ease); }
.btn-solid:hover svg { transform: translateX(3px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--faint); }
.btn[aria-disabled="true"] { background: var(--bg); color: var(--faint); border-color: var(--line); box-shadow: none; cursor: not-allowed; }
.btn[aria-disabled="true"]:active { transform: none; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }

.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.wait { background: var(--bg); color: var(--faint); border: 1px solid var(--line); }
.ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.ico.ok { background: var(--ok-soft); color: var(--ok); }
.ico.lg { width: 44px; height: 44px; border-radius: 12px; }

/* ---------- hero ---------- */
.hero { min-height: calc(100vh - 76px); min-height: calc(100dvh - 76px); display: flex; align-items: center; padding: 24px 0 56px; }
.hero .wrap { width: 100%; display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  margin: 0 0 28px;
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.2; letter-spacing: -0.035em; font-weight: 700; margin: 0 0 24px; }
h1 .ln { display: block; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
.lead { font-size: 20px; color: var(--muted); margin: 0 0 40px; max-width: 26em; line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }
.facts { list-style: none; margin: 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 28px; }
.facts li { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--muted); }
.facts svg { color: var(--accent); flex: none; }

/* hero flow card */
.flow { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 26px 26px 22px; }
.steps { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steps li { font-size: 12.5px; font-weight: 600; color: var(--faint); transition: color .3s; }
.steps .bar { display: block; height: 4px; border-radius: 4px; background: var(--line); margin-bottom: 10px; overflow: hidden; }
.steps .bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(1); transform-origin: left; }
.steps li.on { color: var(--ink); }
.steps .num { color: var(--accent); margin-right: 4px; }
.stage { display: grid; gap: 12px; min-height: 372px; align-content: start; }
.card { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; background: var(--surface); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.msg { font-size: 16px; color: var(--ink); line-height: 1.55; margin: 0; min-height: 3.1em; }
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--accent); vertical-align: -0.15em; margin-left: 2px; animation: blink 1s steps(1) infinite; }
.caret[hidden] { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tasks li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink); }
.tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; transition: background-color .25s, border-color .25s; }
.tick svg { opacity: 0; transform: scale(.5); transition: opacity .2s, transform .35s var(--spring); }
.tasks li.done .tick { background: var(--ok); border-color: var(--ok); }
.tasks li.done .tick svg { opacity: 1; transform: none; }
.tasks li:not(.done) { color: var(--faint); }
.tool { display: flex; align-items: center; gap: 14px; }
.tool-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.tool-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.flow-foot { margin: 16px 0 0; font-size: 13px; color: var(--faint); display: flex; justify-content: space-between; }

/* pending steps stay visible as quiet previews; the active step lifts in */
.js .stage .card { opacity: .38; transform: scale(.985); transition: opacity .4s var(--ease), transform .4s var(--ease), box-shadow .4s; }
.js .stage .card:not(.in) .tool-name, .js .stage .card:not(.in) .tool-meta { filter: blur(5px); }
.stage .tool-name, .stage .tool-meta { transition: filter .6s var(--ease); }
.stage .card.in { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .6s var(--ease), box-shadow .4s; }
.stage .card.pop.in { transition: opacity .4s var(--ease), transform .6s var(--spring), box-shadow .4s; box-shadow: 0 8px 24px rgba(22,133,91,.14); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.stage.out .card { opacity: .38; transform: scale(.985); }
.stage.out .msg { opacity: 0; transition: opacity .3s; }

/* ---------- sections ---------- */
.section { padding: 120px 0 0; }
.section-head { margin-bottom: 40px; max-width: 40em; }
.label { display: inline-block; font-size: 13.5px; font-weight: 600; color: var(--accent); margin: 0 0 10px; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.3; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 12px; }
.section-head p { color: var(--muted); margin: 0; font-size: 18px; }

/* tools */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tool-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  padding: 26px; display: flex; flex-direction: column;
}
.tool-card h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; margin: 18px 0 8px; line-height: 1.4; }
.tool-card .tool-meta { margin: 0 0 14px; }
.tool-card p { margin: 0 0 8px; color: var(--muted); font-size: 16px; }
.tool-card .env { font-size: 14px; color: var(--faint); margin-bottom: 22px; }
.tool-card .btn { margin-top: auto; width: 100%; }
.tool-card.next { background: transparent; box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--faint) 55%, transparent); }
.tool-card.next h3 { margin-top: 18px; }

/* guide cta */
.guide-cta {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  padding: 40px 44px; display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.guide-cta .text { display: flex; gap: 20px; align-items: flex-start; }
.guide-cta h2 { margin-bottom: 8px; }
.guide-cta p { margin: 0; color: var(--muted); max-width: 30em; }
.guide-cta .btn { flex: none; }

/* report */
.report {
  display: grid; grid-template-columns: 1.1fr .9fr; column-gap: 48px; row-gap: 0; align-items: start;
  grid-template-areas: "intro memo" "methods memo";
}
.report .intro { grid-area: intro; }
.report .methods { grid-area: methods; }
.report .memo { grid-area: memo; }
.report .section-head { margin-bottom: 28px; }
.methods { display: grid; gap: 14px; }
.method {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px;
  display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: center;
}
.method h3 { font-size: 17px; margin: 0; letter-spacing: -0.01em; }
.method p { margin: 0; color: var(--muted); font-size: 15.5px; grid-column: 1; }
.method .btn { grid-column: 2; grid-row: 1 / span 2; }
.mail-line { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--faint); }
.copy-btn {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft);
  border: 0; border-radius: 8px; padding: 4px 10px; cursor: pointer;
}
.memo { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 26px 28px; }
.memo .card-head { font-size: 15px; color: var(--ink); margin-bottom: 16px; }
.memo ol { margin: 0; padding: 0; list-style: none; counter-reset: q; display: grid; gap: 12px; }
.memo li { counter-increment: q; display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: 16px; }
.memo li::before {
  content: counter(q); width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; margin-top: 1px;
}
.memo li small { display: block; color: var(--faint); font-size: 14px; }

/* footer */
.foot { margin-top: 120px; border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 14.5px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot p { margin: 0; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- guide page ---------- */
.page-head { padding: 56px 0 0; max-width: 46em; }
.page-head .lead { margin-bottom: 28px; }
.page-head h1 { font-size: clamp(36px, 4.6vw, 56px); }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 14px; color: var(--muted); display: inline-block; }
.parts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 56px; }
.part { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 28px 28px 20px; }
.part .label { font-size: 12.5px; letter-spacing: .06em; }
.part h2 { font-size: 22px; margin-bottom: 14px; }
.chapters { list-style: none; margin: 0; padding: 0; }
.chapters li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; }
.part .members { color: var(--muted); margin: 0 0 20px; }
.closing { margin-top: 56px; text-align: center; }
.closing p { color: var(--muted); margin: 0 0 18px; }

/* ---------- entrance & reveal ---------- */
.js .rise { opacity: 0; transform: translateY(22px); filter: blur(8px); }
.is-in .rise { opacity: 1; transform: none; filter: none; transition: opacity .8s var(--ease), transform .9s var(--ease), filter .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal { opacity: 0; transform: translateY(24px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
/* fail-safe: main.js never ran -> show everything */
.no-anim .rise, .no-anim .reveal, .no-anim .stage .card { opacity: 1 !important; transform: none !important; filter: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .hero .wrap { gap: 40px; }
  .tools { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .nav { display: none; }
  .burger { display: block; }
  .hero { min-height: 0; padding: 16px 0 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .lead { font-size: 18px; margin-bottom: 32px; }
  .actions { margin-bottom: 32px; }
  .section { padding-top: 80px; }
  .tools { grid-template-columns: 1fr; }
  .guide-cta { flex-direction: column; align-items: flex-start; padding: 28px; }
  .report { grid-template-columns: 1fr; grid-template-areas: "intro" "memo" "methods"; row-gap: 20px; }
  .report .section-head { margin-bottom: 8px; }
  .parts { grid-template-columns: 1fr; }
  .foot { margin-top: 80px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  h1 { font-size: clamp(34px, 9.4vw, 44px); }
  .actions .btn, .guide-cta .btn { flex: 1 1 100%; width: 100%; }
  .flow { padding: 20px 18px 18px; border-radius: 20px; }
  .steps li { font-size: 11.5px; }
  .stage { min-height: 400px; }
  .facts { flex-direction: column; }
  .method { grid-template-columns: 1fr; }
  .method .btn { grid-column: 1; grid-row: auto; margin-top: 10px; width: 100%; }
  .guide-cta .text { flex-direction: column; gap: 14px; }
}
@media (min-width: 881px) and (max-height: 760px) {
  h1 { font-size: clamp(40px, 4.8vw, 60px); }
  .lead { margin-bottom: 30px; }
  .actions { margin-bottom: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .caret { display: none; }
  .js .rise, .js .reveal { opacity: 1; transform: none; filter: none; }
}
