/* ---------------------------------------------------
   Tokens
--------------------------------------------------- */
:root {
  --bg: #FAFAF8;
  --bg-alt: #F1EEFB;
  --card: #FFFFFF;
  --ink: #1C1B29;
  --muted: #6E6C7C;
  --primary: #4B2FD6;
  --primary-dark: #3A22AD;
  --teal: #0F9D74;
  --border: #E7E3F4;

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 28px;

  --shadow-card: 0 1px 2px rgba(28, 27, 41, 0.04), 0 8px 24px rgba(28, 27, 41, 0.06);
  --shadow-btn: 0 6px 18px rgba(75, 47, 214, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.wrap--narrow { max-width: 720px; }
.wrap--guide { max-width: 760px; padding-top: 8px; padding-bottom: 90px; }
.center { text-align: center; }

/* ---------------------------------------------------
   Buttons
--------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 26px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  background: none;
}
.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-btn); }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--ink); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--small { padding: 9px 18px; font-size: 13.5px; }
.btn--large { padding: 17px 34px; font-size: 16px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ---------------------------------------------------
   Announcement bar
--------------------------------------------------- */
.announce { background: var(--teal); color: #fff; }
.announce__inner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 32px; font-size: 13.5px; text-align: center; flex-wrap: wrap;
}
.announce svg { flex-shrink: 0; }
.announce a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.announce a:hover { opacity: 0.85; }

/* ---------------------------------------------------
   Topbar
--------------------------------------------------- */
.topbar { padding: 22px 0; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar__right { display: flex; align-items: center; gap: 14px; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -0.01em; }
.logo__by { font-weight: 500; color: var(--muted); font-size: 15px; }

.lang-switch {
  display: flex; background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px;
}
.lang-btn {
  border: none; background: none; font-family: var(--font-mono); font-size: 12.5px;
  font-weight: 500; padding: 6px 13px; border-radius: 999px; cursor: pointer;
  color: var(--muted); transition: background 0.15s ease, color 0.15s ease;
}
.lang-btn.is-active { background: var(--primary); color: #fff; }
.lang-btn:hover:not(.is-active) { color: var(--ink); }

/* ---------------------------------------------------
   Hero
--------------------------------------------------- */
.hero { padding: 40px 0 30px; }
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; color: var(--primary); margin: 0 0 18px; }
.hero__title {
  font-family: var(--font-display); font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 20px; font-weight: 600;
}
.hero__title-accent { color: var(--primary); }
.hero__sub { font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 48ch; margin: 0 0 32px; }
.hero__cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hero__cta-meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }

.hero__route { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-l); padding: 48px 28px; box-shadow: var(--shadow-card); }
.route { position: relative; display: flex; flex-direction: column; gap: 46px; padding-left: 6px; }
.route__line { position: absolute; left: 15px; top: 10px; bottom: 10px; width: 2px; background-image: linear-gradient(var(--border) 60%, rgba(0,0,0,0) 0%); background-size: 2px 10px; background-repeat: repeat-y; }
.route__stop { position: relative; display: flex; align-items: center; gap: 18px; }
.route__dot { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-alt); border: 2px solid var(--border); flex-shrink: 0; position: relative; z-index: 1; }
.route__stop:nth-child(2) .route__dot, .route__stop:nth-child(3) .route__dot { border-color: var(--primary); background: #fff; }
.route__dot--final { background: var(--teal); border-color: var(--teal); }
.route__pulse { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--teal); opacity: 0; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(0.7); opacity: 0.55; } 70% { transform: scale(1.5); opacity: 0; } 100% { opacity: 0; } }
.route__label { font-family: var(--font-mono); font-size: 14.5px; font-weight: 500; color: var(--ink); }
.route__stop--final .route__label { color: var(--teal); font-weight: 600; }

/* ---------------------------------------------------
   Sections
--------------------------------------------------- */
.section { padding: 84px 0; }
.section--alt { background: var(--bg-alt); }
.section--cta { padding-bottom: 60px; }
.section__eyebrow { font-family: var(--font-mono); font-size: 13px; color: var(--primary); margin: 0 0 12px; }
.section__title { font-family: var(--font-display); font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 40px; max-width: 24ch; }
.section--cta .section__title { margin: 0 0 12px; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 32px; box-shadow: var(--shadow-card); }
.card__tag { font-family: var(--font-mono); font-size: 12.5px; color: var(--teal); margin: 0 0 14px; letter-spacing: 0.03em; }
.card__title { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin: 0 0 12px; }
.card__text { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0; }

.notebox { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius-s); padding: 26px 28px; }
.notebox__title { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin: 0 0 8px; }
.notebox__text { color: var(--muted); font-size: 14.5px; line-height: 1.65; margin: 0; }

.pdf-link { margin-top: 18px; font-size: 13.5px; }
.pdf-link a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------
   Footer
--------------------------------------------------- */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); }
.footer__inner a { text-decoration: none; color: var(--primary); font-weight: 600; }
.footer__inner a:hover { text-decoration: underline; }

/* ---------------------------------------------------
   GUIDE VIEW
--------------------------------------------------- */
.guide__top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 0 18px; gap: 12px; flex-wrap: wrap;
}
.guide__back { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--muted); }
.guide__back:hover { color: var(--primary); }
.guide__meta { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.guide__meta #g-part-num, .guide__meta #g-step-num, .guide__meta #g-step-total { color: var(--ink); font-weight: 600; }

.progress { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; margin-bottom: 40px; }
.progress__bar { height: 100%; width: 6.25%; background: linear-gradient(90deg, var(--primary), var(--teal)); border-radius: 999px; transition: width 0.35s ease; }

.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-l); padding: 40px; box-shadow: var(--shadow-card); animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.step__title { font-family: var(--font-display); font-size: clamp(22px, 3vw, 28px); font-weight: 600; margin: 0 0 16px; letter-spacing: -0.01em; }
.step__body { font-size: 16px; line-height: 1.7; color: var(--ink); margin: 0 0 16px; }
.step__body b { color: var(--primary); }

.step__quote {
  margin: 0 0 16px; padding: 16px 18px; background: var(--bg-alt); border-left: 3px solid var(--primary);
  border-radius: var(--radius-s); font-size: 14.5px; line-height: 1.6; color: var(--ink); font-style: italic;
}

.step__template-intro { font-size: 15px; color: var(--muted); margin: 22px 0 10px; }
.step__template {
  white-space: pre-wrap; word-wrap: break-word; font-family: var(--font-mono); font-size: 13px;
  line-height: 1.7; background: #F4F4F4; border-radius: var(--radius-s); padding: 18px 20px;
  margin: 0 0 14px; color: var(--ink);
}
.step__template .ph { color: var(--primary); font-weight: 600; }
.step__after-template { font-size: 14.5px; color: var(--muted); margin: 0 0 8px; }

.step__link-wrap { margin: 0 0 16px; }
.step__link {
  display: inline-block; font-family: var(--font-mono); font-size: 13.5px; color: var(--primary);
  text-decoration: underline; word-break: break-all;
}

.step__image-wrap {
  margin: 20px 0; border: 1px solid var(--border); border-radius: var(--radius-m);
  overflow: hidden; background: #fff;
}
.step__image { display: block; width: 100%; height: auto; }

.step__note {
  font-size: 13.5px; line-height: 1.6; color: var(--teal); background: #EAFAF0;
  border-radius: var(--radius-s); padding: 12px 16px; margin: 6px 0 0;
}

.step__skip {
  margin: 20px 0 0; padding-top: 18px; border-top: 1px dashed var(--border);
  font-size: 13.5px; color: var(--muted);
}
.step__skip a { color: var(--primary); font-weight: 600; text-decoration: underline; margin-left: 6px; }

.step--finish { text-align: center; }
.finish__icon { font-size: 44px; margin-bottom: 8px; }
.finish__actions { display: flex; gap: 12px; justify-content: center; margin: 26px 0 20px; flex-wrap: wrap; }
.finish__help { font-size: 13.5px; color: var(--muted); }
.finish__help a { color: var(--teal); font-weight: 600; text-decoration: underline; margin-left: 4px; }

.guide__nav {
  display: flex; justify-content: space-between; align-items: center; margin-top: 24px;
}

/* ---------------------------------------------------
   Responsive
--------------------------------------------------- */
@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: 1fr; }
  .hero__route { order: -1; padding: 36px 24px; }
  .route { gap: 34px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .step { padding: 26px; }
  .footer__inner { flex-direction: column; gap: 10px; align-items: flex-start; }
  .topbar__right { gap: 10px; }
}
@media (max-width: 480px) {
  .topbar__inner { flex-wrap: wrap; }
  .btn--small { padding: 8px 14px; font-size: 12.5px; }
}
