:root{
  --bg:#f6f7f8;
  --card:#ffffff;
  --text:#0f1216;
  --muted:#7b8088;
  --border:#eceef1;
  --shadow: 0 14px 40px rgba(15,18,22,.10);
  --shadow2: 0 10px 24px rgba(15,18,22,.08);
  --radius: 22px;
  --max: 980px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 360px at 50% -140px, rgba(15,18,22,.05), transparent 60%),
    linear-gradient(#fbfbfc, var(--bg));
}

.header{
  position: sticky; top:0; z-index:10;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(236,238,241,.85);
}
.header-inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.brand{display:flex; align-items:center; gap:10px}
.logo{
  width:34px; height:34px; border-radius:12px;
  background:#0f1216; color:#fff;
  display:grid; place-items:center;
  font-weight:900; font-size:12px;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.brand-title{font-weight:900; letter-spacing:-.01em}
.tagline{
  color: rgba(15,18,22,.55);
  font-weight:800;
  font-size:14px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.app{
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 20px 46px;
}
.stage{ position:relative; min-height: 680px; }

.view{
  position:absolute;
  inset:0;
  display:none;
}
.view.active{display:block}

/* transitions between views */
.view.enter-right{ animation: enterRight .42s var(--ease) both; }
.view.enter-left{  animation: enterLeft  .42s var(--ease) both; }
.view.exit-left{   animation: exitLeft   .30s var(--ease) both; }
.view.exit-right{  animation: exitRight  .30s var(--ease) both; }

@keyframes enterRight{
  from{ opacity:0; transform: translateX(28px); filter: blur(10px); }
  to{ opacity:1; transform: translateX(0); filter: blur(0); }
}
@keyframes enterLeft{
  from{ opacity:0; transform: translateX(-28px); filter: blur(10px); }
  to{ opacity:1; transform: translateX(0); filter: blur(0); }
}
@keyframes exitLeft{
  from{ opacity:1; transform: translateX(0); filter: blur(0); }
  to{ opacity:0; transform: translateX(-22px); filter: blur(8px); }
}
@keyframes exitRight{
  from{ opacity:1; transform: translateX(0); filter: blur(0); }
  to{ opacity:0; transform: translateX(22px); filter: blur(8px); }
}

.card{
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 40px 34px;
}
.center{text-align:center}

.pill{
  display:inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.7);
  color: rgba(15,18,22,.65);
  font-weight: 900;
  font-size: 13px;
}

.h1{
  margin: 12px 0 16px;
  font-size: 56px;
  letter-spacing: -0.045em;
  line-height: 1.0;
  font-weight: 950;
}
.subtitle{
  margin: 0 auto 26px;
  max-width: 760px;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(15,18,22,.70);
}

.styles{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 920px;
  margin: 18px auto 26px;
}
.archetype-card{
  padding: 18px 16px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 12px 22px rgba(15,18,22,.06);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  min-height: 116px;
}
.a-icon{
  width: 36px; height: 36px;
  border-radius: 14px;
  border: 1px solid rgba(15,18,22,.12);
  background: #fff;
  display:grid; place-items:center;
  color: rgba(15,18,22,.35);
}
.a-icon svg{width:22px; height:22px}
.a-title{
  font-weight: 950;
  letter-spacing: -0.015em;
  font-size: 20px;
}
.a-sub{
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .18em;
  color: rgba(15,18,22,.35);
}

.primary-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 14px;

  padding: 10px 30px;

  border-radius: 14px;   
  border: none;

  background: #0f1216;
  color: #fff;

  cursor: pointer;

  box-shadow:
    0 10px 22px rgba(0,0,0,.25),
    0 2px 6px rgba(0,0,0,.15);

  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.primary-btn:hover{
  filter: brightness(1.05);
  box-shadow:
    0 14px 30px rgba(0,0,0,.28),
    0 4px 10px rgba(0,0,0,.18);
}

.primary-btn:active{
  transform: translateY(1px);
  box-shadow:
    0 6px 16px rgba(0,0,0,.25),
    0 2px 6px rgba(0,0,0,.18);
}

.btn-text{
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.btn-text.small{ font-size: 18px; font-weight: 950; }
.btn-arrow{
  font-size: 28px;
  line-height: 1;
  opacity: .92;
}

.secondary-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f4f5f6;
  color: #0f1216;
  font-weight: 950;
  cursor:pointer;
  box-shadow: 0 10px 24px rgba(15,18,22,.06);
}
.secondary-btn.wide{ width: 100%; }
.secondary-btn:active{ transform: translateY(1px); }

.copyright{
  margin-top: 20px;
  color: rgba(15,18,22,.40);
  font-weight: 700;
  font-size: 14px;
}
.copyright.small{ font-size: 13px; margin-top: 18px; }

/* Question */
.question-card{ padding: 30px 28px; }
.q-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-bottom: 10px;
}
.back{
  border:none;
  background: transparent;
  color: rgba(15,18,22,.70);
  font-weight: 900;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor:pointer;
}
.back:hover{ background: rgba(15,18,22,.04); }
.q-meta{ color: rgba(15,18,22,.58); font-weight: 900; }

.q-progress{
  height: 4px;
  background: rgba(15,18,22,.08);
  border-radius: 999px;
  overflow:hidden;
  margin-bottom: 18px;
}
.q-progress > div{
  height:100%;
  width:0%;
  background:#0f1216;
  border-radius:999px;
  transition: width .35s var(--ease);
}
.q-title{
  margin: 0 0 16px;
  font-size: 44px;
  letter-spacing: -0.04em;
  line-height: 1.02;
  font-weight: 950;
}

.answers{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.answers button{
  padding: 18px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  cursor:pointer;
  text-align:left;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.01em;
  line-height: 1.25;
  box-shadow: 0 10px 22px rgba(15,18,22,.06);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.answers button:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(15,18,22,.08);
}

/* RESULT — pixel layout под мокап */
.result-shell{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.result-hero{
  position: relative;
  height: 260px;
  border-radius: 24px 24px 0 0;
  overflow: hidden;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Чёткое затемнение ТОЛЬКО внутри hero */
.result-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,.75) 0%,
    rgba(0,0,0,.55) 40%,
    rgba(0,0,0,.25) 70%,
    rgba(0,0,0,.05) 100%
  );
  pointer-events:none;
}

/* ВЕСЬ ТЕКСТ В HERO — ВЫШЕ overlay */
.result-hero-inner{
  position: relative;
  z-index: 1;
  padding-left: 30px;
  padding-top: 30px;
}

.result-kicker{
  color: rgba(255,255,255,.78);
  font-weight: 950;
  letter-spacing: .12em;
  font-size: 12px;
  text-transform: uppercase;
}
.result-hero-title{
  color:#fff;
  margin-top: 10px;
  font-weight: 950;
  letter-spacing: -0.04em;
  font-size: 56px;
  line-height: 1.0;
  max-width: 760px;
}

.result-body{
  padding: 22px 28px 26px;
  max-width: var(--max);
  margin: 0 auto;
}

.result-grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  align-items:start;
}

.proto{
  display:flex;
  align-items:center;
  gap: 14px;
  margin-bottom: 10px;
}
.proto-dot{
  width: 44px; height: 44px;
  border-radius: 22px;
  background: #0f1216;
  color:#fff;
  display:grid;
  place-items:center;
  font-weight: 950;
}
.proto-label{
  color: rgba(15,18,22,.45);
  font-weight: 800;
  font-size: 14px;
}
.proto-name{
  font-weight: 950;
  letter-spacing: -0.01em;
  font-size: 18px;
}
.quote{
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  padding-left: 14px;
  border-left: 3px solid rgba(15,18,22,.18);
  margin: 8px 0 14px;
}
.result-desc{
  margin: 0;
  color: rgba(15,18,22,.72);
  font-size: 16px;
  line-height: 1.6;
  max-width: 560px;
}

.traits-card{
  border: 1px solid var(--border);
  border-radius: 18px;
  background:#fff;
  box-shadow: 0 10px 24px rgba(15,18,22,.06);
  padding: 16px 16px;
}
.traits-title{
  font-weight: 950;
  letter-spacing: .12em;
  font-size: 13px;
  color: rgba(15,18,22,.55);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.traits{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.traits li{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  font-weight: 850;
  color: rgba(15,18,22,.78);
  line-height: 1.25;
}
.traits li::before{
  content:"✓";
  width: 18px;
  height: 18px;
  border-radius: 9px;
  border: 1px solid rgba(15,18,22,.14);
  display:grid;
  place-items:center;
  font-size: 12px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.result-actions{
  margin-top: 18px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items:stretch;
}
.ico{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.primary-btn .ico svg{
  width: 18px;
  height: 18px;
}

/* First page reveal like video (no fake loading) */
.preload [data-anim]{
  opacity: 0;
  transform: translateY(14px);
  filter: blur(10px);
}
.loaded [data-anim]{
  animation: reveal .52s var(--ease) both;
  animation-delay: calc(var(--i) * 70ms);
}
.loaded [data-anim="1"]{ --i:0; }
.loaded [data-anim="2"]{ --i:1; }
.loaded [data-anim="3"]{ --i:2; }
.loaded [data-anim="4"]{ --i:3; }
.loaded [data-anim="5"]{ --i:4; }
.loaded [data-anim="6"]{ --i:5; }

@keyframes reveal{
  from{ opacity:0; transform: translateY(14px); filter: blur(12px); }
  to{ opacity:1; transform: translateY(0); filter: blur(0); }
}

@media (max-width: 980px){
  .result-hero-title{font-size: 44px}
}
@media (max-width: 900px){
  .card{padding: 28px 20px}
  .question-card{padding: 24px 18px}
  .h1{font-size: 44px}
  .q-title{font-size: 32px}
  .styles{grid-template-columns: 1fr 1fr; gap: 12px}
  .btn-text{font-size: 22px}
  .btn-arrow{font-size: 24px}

  .result-grid{grid-template-columns: 1fr; gap: 14px}
  .result-actions{grid-template-columns: 1fr; }
  .result-hero{height: 220px}
  .result-hero-title{font-size: 34px}
  .quote{font-size: 24px}
}
@media (prefers-reduced-motion: reduce){
  .view.enter-right,.view.enter-left,.view.exit-left,.view.exit-right{animation:none}
  .loaded [data-anim]{animation:none}
  .q-progress > div{transition:none}
}

/* Pixel-perfect divider: линия + мягкая тень вниз (без градиентной полосы) */
.soft-divider{
  height: 1px;
  margin: 24px 0 18px;
  background: rgba(15,18,22,.08);

  /* ключ: тень вниз, очень мягкая, без "полосы" */
  box-shadow:
    0 12px 18px -18px rgba(15,18,22,.35),
    0 24px 30px -30px rgba(15,18,22,.25);

  /* чтобы линия визуально была тоньше/чище */
  transform: translateZ(0);
}

html, body {
  height: 100%;
}

@media (min-width: 1024px) {
  .app {
    max-height: calc(100vh - 150px); 
  }
}

.site-footer{
  text-align: center;
  padding: 24px 20px 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(15,18,22,.35);
}

.cta-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 18px 32px;
  border-radius: 16px;

  background: #0b0f14;
  color: #ffffff;

  font-weight: 700;
  font-size: 16px;
  letter-spacing: .02em;

  text-decoration: none;   /* убираем подчёркивание */
  border: none;
  cursor: pointer;

  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  transition: all .2s ease;
}

/* убираем фиолетовый visited */
.cta-btn:visited{
  color: #ffffff;
}

/* hover */
.cta-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0,0,0,.35);
}

/* active */
.cta-btn:active{
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}

/* Overlay */
.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all .25s ease;
  z-index: 9999;
}

/* Active state */
.modal-overlay.active{
  opacity: 1;
  visibility: visible;
}

/* Modal box */
.modal{
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 480px;
  width: 90%;
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,.25);
  animation: modalIn .25s ease;
}

@keyframes modalIn{
  from{
    transform: translateY(20px);
    opacity: 0;
  }
  to{
    transform: translateY(0);
    opacity: 1;
  }
}

/* Close button */
.modal-close{
  position: absolute;
  top: 18px;
  right: 18px;
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
}

/* Typography */
.modal-title{
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-text{
  font-size: 14px;
  color: #555;
  margin-bottom: 24px;
}

/* Buttons */
.modal-actions{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  background: #0b0f14;
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  transition: .2s ease;
}

.modal-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}
