:root {
  --lilac: #ddd0ec;
  --lilac-deep: #7d5f9a;
  --lilac-mid: #9c7fb8;
  --plum: #4a3b5c;
  --ink: #5a4670;
  --cream: #fbf3e6;
  --gold: #b8893b;
  --gold-soft: #e7cf94;
  --gold-glow: #f5d76e;
  --line: #d8c6e6;
  --glass: rgba(255, 255, 255, .58);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; min-height: 100%; background: var(--cream) linear-gradient(170deg, var(--lilac) 0%, #f3e9f0 40%, var(--cream) 100%) no-repeat; }
body {
  min-height: 100vh;
  font-family: 'Assistant', sans-serif;
  font-size: 18px;
  line-height: 1.75;
  color: var(--plum);
  overflow-x: hidden;
}
main { max-width: 560px; margin: 0 auto; padding: 32px 16px 24px; position: relative; z-index: 1; }
h1, h2, h3 { font-family: 'Suez One', serif; font-weight: 400; color: var(--plum); line-height: 1.3; }
h1 { font-size: 30px; }
h2 { font-size: 26px; text-align: center; }
em { font-style: normal; color: #a87b2c; text-shadow: 0 0 14px rgba(245, 215, 110, .6); }

.sparkles span { position: fixed; color: var(--gold); opacity: .55; font-size: 14px; animation: twinkle 4s ease-in-out infinite; z-index: 0; }
.sparkles span:nth-child(1) { top: 6%; right: 10%; }
.sparkles span:nth-child(2) { top: 18%; left: 8%; animation-delay: 1s; }
.sparkles span:nth-child(3) { top: 46%; right: 5%; animation-delay: 2s; font-size: 10px; }
.sparkles span:nth-child(4) { top: 70%; left: 6%; animation-delay: .5s; }
.sparkles span:nth-child(5) { top: 88%; right: 14%; animation-delay: 1.5s; font-size: 11px; }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: .8; transform: scale(1.1); } }

/* שלבים */
.step { display: none; text-align: center; animation: rise .7s ease both; }
.step.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* פתיחה: שלושה קלפים אמיתיים + טקסט */
.hero-cards { position: relative; height: 230px; margin: 4px auto 18px; max-width: 340px; }
.hero-cards img { position: absolute; top: 0; width: 120px; height: auto; border-radius: 8px; border: 3px solid #fff; box-shadow: 0 12px 26px rgba(74, 59, 92, .28); }
.hero-cards img:nth-child(1) { right: 6%; top: 22px; transform: rotate(9deg); }
.hero-cards img:nth-child(2) { right: 50%; margin-right: -60px; z-index: 2; transform: rotate(-1deg); }
.hero-cards img:nth-child(3) { left: 6%; top: 22px; transform: rotate(-9deg); }
.hero-text { text-align: center; }
.hero-text .topics { max-width: 400px; margin: 0 auto; }
.me { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; font-size: 15px; color: var(--lilac-deep); }
.me img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); flex: none; }

/* פתיחה (ישן) */
.portrait { width: 150px; height: 150px; margin: 0 auto; border-radius: 50%; padding: 4px; background: linear-gradient(135deg, var(--gold-soft), var(--gold), var(--gold-soft)); box-shadow: 0 10px 30px rgba(74, 59, 92, .18); }
.portrait img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--cream); display: block; }
.name { font-family: 'Suez One', serif; font-size: 20px; color: var(--ink); margin-top: 12px; }
.tagline { font-size: 15px; color: var(--lilac-deep); margin-top: -4px; }
.glass { margin-top: 22px; background: var(--glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid #fff; border-radius: 28px; padding: 28px 20px; box-shadow: 0 12px 40px rgba(125, 95, 154, .12); }
.lead { margin: 10px 0 20px; color: var(--ink); }
.glass.narrow { max-width: 480px; margin: 40px auto 0; }
.topics { display: flex; flex-direction: column; gap: 11px; }

.btn { display: block; width: 100%; border: 0; cursor: pointer; font: 600 17px/1.4 'Assistant', sans-serif; padding: 15px 18px; border-radius: 999px; text-decoration: none; text-align: center; transition: transform .2s, box-shadow .2s; }
.btn small { display: block; font-weight: 400; font-size: 14px; opacity: .85; }
.btn:active { transform: scale(.98); }
.btn-main { background: linear-gradient(90deg, var(--lilac-deep), var(--lilac-mid)); color: #fff; box-shadow: 0 8px 22px rgba(125, 95, 154, .35); }
.btn-soft { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn:hover { box-shadow: 0 10px 26px rgba(125, 95, 154, .3); }
.btn:focus-visible, .card-back:focus-visible, .again:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* בחירת קלפים */
.topic-chip { display: inline-block; font-size: 14px; color: var(--lilac-deep); border: 1px solid var(--line); background: #fff8; padding: 2px 14px; border-radius: 999px; margin-bottom: 10px; }
.counter { font-size: 15px; color: var(--gold); font-weight: 600; margin-bottom: 18px; }
.deck { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.card-back { aspect-ratio: 2 / 3.3; border-radius: 8px; border: 1px solid var(--gold-soft); cursor: pointer; position: relative; background:
  radial-gradient(circle at 50% 50%, rgba(245, 215, 110, .55) 0 7%, transparent 8%),
  repeating-linear-gradient(45deg, rgba(255, 255, 255, .08) 0 4px, transparent 4px 8px),
  linear-gradient(160deg, var(--lilac-mid), var(--lilac-deep) 60%, #5f4678);
  box-shadow: 0 4px 10px rgba(74, 59, 92, .22); transition: transform .25s, opacity .4s, box-shadow .25s; animation: deal .5s ease both; }
.card-back::after { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(231, 207, 148, .55); border-radius: 5px; }
.card-back:hover { transform: translateY(-6px); box-shadow: 0 10px 18px rgba(74, 59, 92, .3); }
.card-back.chosen { transform: translateY(-10px) scale(1.04); box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(245, 215, 110, .8); cursor: default; }
.deck.done .card-back:not(.chosen) { opacity: .25; pointer-events: none; }
@keyframes deal { from { opacity: 0; transform: translateY(20px) rotate(-4deg); } to { opacity: 1; transform: none; } }

/* הקריאה */
.spread { display: flex; justify-content: center; gap: 12px; margin: 18px 0 8px; perspective: 900px; }
.flip { width: 30%; max-width: 140px; aspect-ratio: 2 / 3.3; position: relative; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.flip.open { transform: rotateY(180deg); }
.flip > div { position: absolute; inset: 0; border-radius: 10px; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.flip .back { background: inherit; }
.flip .face { transform: rotateY(180deg); background: linear-gradient(180deg, #fffaf2, var(--cream)); border: 1px solid var(--gold-soft); box-shadow: 0 8px 22px rgba(74, 59, 92, .2); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px; gap: 6px; overflow: hidden; }
.flip .face::before { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(184, 137, 59, .45); border-radius: 7px; }
.flip .face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; z-index: 1; }
.face .glyph { color: var(--gold); font-size: 22px; text-shadow: 0 0 10px rgba(245, 215, 110, .7); }
.face .cname { font-family: 'Suez One', serif; font-size: 15px; line-height: 1.25; color: var(--plum); }
.face .suit { font-size: 11px; color: var(--lilac-deep); }
.pos-label { font-size: 13px; color: var(--lilac-deep); margin-top: 6px; }
.spread-col { display: flex; flex-direction: column; align-items: center; width: 56%; max-width: 230px; }
.spread-col .flip { width: 100%; max-width: none; }

.reading { text-align: right; margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { background: var(--glass); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid #fff; border-radius: 22px; padding: 20px 20px 16px; opacity: 0; transform: translateY(10px); transition: opacity .8s, transform .8s; }
.msg.show { opacity: 1; transform: none; }
.msg .pos { font-size: 13px; color: var(--gold); font-weight: 700; letter-spacing: .5px; }
.msg h3 { font-size: 22px; margin: 2px 0 8px; }
.msg p { white-space: pre-line; }
.msg details { margin-top: 10px; font-size: 16px; color: var(--ink); }
.msg summary { cursor: pointer; color: var(--lilac-deep); font-weight: 600; list-style: none; }
.msg summary::-webkit-details-marker { display: none; }
.msg summary::before { content: '✧ '; color: var(--gold); }
.msg details p { margin-top: 6px; }

.cta { margin-top: 26px; background: linear-gradient(170deg, #fff 0%, #f6eefb 100%); border: 1px solid var(--gold-soft); border-radius: 28px; padding: 26px 20px 20px; box-shadow: 0 14px 40px rgba(125, 95, 154, .16); opacity: 0; transform: translateY(10px); transition: opacity .8s, transform .8s; }
.cta.show { opacity: 1; transform: none; }
.cta-photo { width: 84px; height: 84px; margin: -64px auto 10px; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, var(--gold-soft), var(--gold)); }
.cta-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #fff; display: block; }
.cta-text { font-family: 'Suez One', serif; font-size: 19px; line-height: 1.6; color: var(--plum); margin-bottom: 18px; }
.cta-buttons { display: flex; flex-direction: column; gap: 11px; }
.again { margin-top: 16px; background: none; border: 0; color: var(--lilac-deep); font: 600 15px 'Assistant', sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* נעים להכיר */
.about { margin-top: 56px; text-align: center; }
.about p { margin-top: 12px; color: var(--ink); }
.services { list-style: none; margin-top: 22px; display: grid; gap: 10px; }
.services li { background: var(--glass); border: 1px solid #fff; border-radius: 18px; padding: 12px 16px; display: flex; flex-direction: column; }
.services strong, .services h3 { font-family: 'Suez One', serif; font-weight: 400; font-size: 19px; color: var(--plum); }
h1 .kicker { display: block; font-family: 'Assistant', sans-serif; font-weight: 600; font-size: 15px; letter-spacing: 1px; color: var(--gold); margin-bottom: 6px; }
.faq { max-width: 760px; margin: 56px auto 0; }
.faq h2 { margin-bottom: 18px; }
.faq details { background: var(--glass); border: 1px solid #fff; border-radius: 18px; padding: 14px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--plum); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '✧ '; color: var(--gold); }
.faq details p { margin-top: 8px; color: var(--ink); }
.services span { font-size: 15px; color: var(--lilac-deep); }

footer { text-align: center; padding: 34px 16px 40px; color: var(--ink); position: relative; z-index: 1; }
footer p:first-child { font-family: 'Suez One', serif; font-size: 18px; }
footer a { color: var(--lilac-deep); }
footer .links { font-size: 15px; margin-top: 4px; }
footer .note { font-size: 13px; opacity: .7; margin-top: 10px; }

/* דסקטופ: פריסה רחבה */
@media (min-width: 900px) {
  main { max-width: 1120px; padding: 56px 32px 24px; }
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }

  #step-topic.active { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; min-height: calc(100vh - 140px); }
  .hero-text { grid-column: 1; grid-row: 1; text-align: right; }
  .hero-text .topics { margin: 0; max-width: 400px; }
  .me { justify-content: flex-start; }
  .hero-cards { grid-column: 2; grid-row: 1; height: 470px; max-width: 520px; width: 100%; margin: 0; }
  .hero-cards img { width: 200px; }
  .hero-cards img:nth-child(2) { margin-right: -100px; }
  .lead { font-size: 20px; }
  h1 { font-size: 46px; }

  #step-pick { max-width: 960px; margin: 0 auto; }
  .deck { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
  .deck .card-back { width: calc((100% - 120px) / 11); border-radius: 10px; }

  #step-reading.active { display: grid; max-width: 960px; margin: 0 auto; grid-template-columns: 300px 1fr; column-gap: 48px; align-items: center;
    grid-template-areas: "chip chip" "title title" "card msg" "cta cta"; }
  #step-reading .topic-chip { grid-area: chip; justify-self: center; }
  #step-reading h2 { grid-area: title; }
  .spread { grid-area: card; margin: 24px 0 0; }
  .spread-col { width: 100%; max-width: 300px; }
  .face .cname { font-size: 24px; }
  .face .glyph { font-size: 36px; }
  .reading { grid-area: msg; margin-top: 24px; }
  .msg { padding: 32px 36px 24px; }
  .msg h3 { font-size: 30px; }
  .msg p { font-size: 20px; }
  .cta { grid-area: cta; width: 100%; max-width: 680px; justify-self: center; margin: 72px auto 0; padding: 32px 40px 24px; }
  .cta-text { font-size: 22px; }
  .cta-buttons { flex-direction: row; }
  .cta-buttons .btn { flex: 1; display: flex; flex-direction: column; justify-content: center; }

  .about { max-width: 900px; margin: 96px auto 0; }
  .about p { font-size: 19px; }
  .services { grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 30px; }
  .services li { padding: 18px 20px; }
}

@media (max-width: 380px) {
  h1 { font-size: 26px; }
  .deck { grid-template-columns: repeat(6, 1fr); gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .msg, .cta { opacity: 1; transform: none; }
}
