@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Baskerville:wght@400;700&display=swap');

:root {
  color-scheme: light;
  --ink: #302333;
  --muted: #685d68;
  --plum: #39283f;
  --plum-deep: #271b30;
  --rose: #9c4469;
  --rose-dark: #763454;
  --paper: #faf7f1;
  --white: #fffefa;
  --line: #e5d9d7;
  --gold: #bd9761;
  --blue: #bbcbd0;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); line-height: 1.55; }
button, textarea { font: inherit; }
a { color: var(--rose-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #c77a9b; outline-offset: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: #fff; padding: .7rem; }
.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; }

.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.nav { width: min(100% - 48px, 1160px); margin: auto; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--plum); text-decoration: none; font: 700 1.35rem/1.1 'Libre Baskerville', Georgia, serif; white-space: nowrap; }
.brand-heart { color: var(--rose); font: 700 1.15rem/1 'DM Sans', sans-serif; margin-right: 7px; }
.navlinks { display: flex; align-items: center; gap: clamp(14px, 2.1vw, 30px); }
.navlinks > a:not(.nav-cta) { color: var(--ink); text-decoration: none; font-size: .91rem; font-weight: 700; white-space: nowrap; }
.navlinks > a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-cta, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 20px; border: 1px solid var(--rose); border-radius: 4px; background: var(--rose); color: #fff !important; text-decoration: none; font-size: .89rem; font-weight: 700; line-height: 1.2; cursor: pointer; transition: background .2s, transform .2s; }
.nav-cta:hover, .button:hover { background: var(--rose-dark); transform: translateY(-2px); text-decoration: none !important; }

main { width: min(100% - 48px, 1160px); margin: auto; padding-bottom: 88px; }
.eyebrow { color: var(--rose-dark); font-size: .72rem; font-weight: 700; letter-spacing: .19em; text-transform: uppercase; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .82fr); align-items: center; min-height: 418px; gap: 30px; }
.hero-copy { max-width: 660px; padding: 54px 0; }
.hero h1 { max-width: 670px; margin: 16px 0 24px; font: 400 clamp(2.7rem, 5.3vw, 4.75rem)/1.09 'Libre Baskerville', Georgia, serif; letter-spacing: -.055em; }
.hero h1 em { color: var(--rose); font-weight: 400; }
.hero p { max-width: 590px; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.13rem); line-height: 1.7; }
.hero-art { position: relative; min-height: 360px; isolation: isolate; }
.hero-art::before { content: ''; position: absolute; inset: 28px 10px 0 24px; border: 1px solid #d9c7bc; border-radius: 50% 50% 0 0; background: #f1e9e2; }
.hero-art::after { content: '✦'; position: absolute; right: 12px; top: 8px; color: var(--gold); font-size: 2rem; }
.hero-card { position: absolute; top: 47px; width: 172px; aspect-ratio: 833 / 1413; object-fit: cover; border: 7px solid #fff9ed; box-shadow: 0 16px 30px #30233335; }
.hero-card.first { left: 15%; transform: rotate(-13deg); }
.hero-card.second { left: 40%; top: 40px; transform: rotate(10deg); }
.hero-caption { position: absolute; z-index: 1; right: 8px; bottom: 4px; padding: 6px 10px; background: var(--paper); color: var(--plum); font: 700 .67rem/1.4 'DM Sans', sans-serif; letter-spacing: .13em; text-transform: uppercase; }

.panel { overflow: hidden; border: 1px solid #decfd1; border-radius: 14px; background: var(--white); box-shadow: 0 24px 70px #4d30400f; }
.reading-form { padding: clamp(25px, 4vw, 54px); }
.steps { display: flex; align-items: center; gap: 12px; margin-bottom: 33px; color: #8c7884; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.steps span { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.steps span:not(:last-child)::after { content: ''; display: block; width: clamp(16px, 4vw, 52px); height: 1px; margin-left: 4px; background: #d9cbd0; }
.steps b { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid currentColor; border-radius: 50%; font-size: .63rem; }
.steps .active { color: var(--rose-dark); }
.steps .active b { border-color: var(--rose); background: var(--rose); color: white; }
.form-intro h2, .result-head h2, .content h2 { margin: 0; color: var(--plum); font: 400 clamp(1.65rem, 3vw, 2.55rem)/1.2 'Libre Baskerville', Georgia, serif; letter-spacing: -.04em; }
.helper { max-width: 730px; margin: 11px 0 25px; color: var(--muted); }
.situations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.situation { display: flex; align-items: flex-start; gap: 13px; min-width: 0; min-height: 98px; padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.situation:hover { border-color: var(--rose); }
.situation:has(input:checked) { border-color: var(--rose); background: #fff3f6; box-shadow: inset 0 0 0 1px var(--rose); }
.situation input { flex: 0 0 auto; margin: 5px 0 0; accent-color: var(--rose); }
.situation strong { display: block; line-height: 1.35; }
.situation small { display: block; margin-top: 5px; color: var(--muted); font-size: .83rem; line-height: 1.4; }
.questionbox { margin: 25px 0 19px; }
.questionbox label { display: block; margin-bottom: 8px; font-size: .9rem; font-weight: 700; }
.questionbox label span { color: var(--muted); font-weight: 400; }
.questionbox textarea { display: block; width: 100%; min-height: 80px; resize: vertical; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); }
.private { margin: 8px 0 0; color: var(--muted); font-size: .78rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.button.secondary { border-color: #e6d3dc; background: #fff; color: var(--rose-dark) !important; }
.button.secondary:hover { background: #fff3f6; }

.result { scroll-margin-top: 24px; background: var(--plum-deep); color: #f7f1e7; }
.result[hidden] { display: none; }
.result-head { max-width: 700px; margin: auto; padding: 52px 22px 30px; text-align: center; }
.result-head .eyebrow { color: #d9b997; }
.result-head h2 { margin: 12px 0; color: #fff9ef; }
.result-head p { margin: 0; color: #d6cbd3; line-height: 1.65; }
.result-head .user-question { margin: 20px auto 0; padding: 12px 16px; border-left: 2px solid #d9b997; background: #42334a; color: #fff3e4; text-align: left; font-size: .88rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(15px, 2.8vw, 34px); padding: 12px clamp(22px, 4vw, 54px) 46px; }
.card { min-width: 0; text-align: center; }
.card-position { display: block; min-height: 39px; margin-bottom: 15px; color: #f1d8c1; font-size: .69rem; font-weight: 700; letter-spacing: .12em; line-height: 1.35; text-transform: uppercase; }
.card-position b { display: inline-block; margin-right: 8px; color: #ac8b81; font-size: .65rem; }
.card-flip { position: relative; display: block; width: min(100%, 235px); aspect-ratio: 833 / 1413; margin: 0 auto; padding: 0; border: 0; background: transparent; cursor: pointer; perspective: 1200px; }
.card-flip:focus-visible { outline: 3px solid #f5ce91; outline-offset: 6px; }
.card-inner { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.card.is-flipped .card-inner { transform: rotateY(180deg); }
.card-face { position: absolute; inset: 0; display: block; overflow: hidden; backface-visibility: hidden; border: 6px solid #ebdcc2; background: #f6eddd; box-shadow: 0 16px 26px #100b17a1; }
.card-face::after { content: ''; position: absolute; inset: 5px; border: 1px solid #ddc897; pointer-events: none; }
.card-face img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-back img { filter: saturate(.87) sepia(.07); }
.card-front { transform: rotateY(180deg); }
.card-action { display: block; min-height: 30px; margin: 14px auto 0; color: #eacdaf; font-size: .78rem; font-weight: 700; }
.card-action::after { content: ' ↻'; }
.card.is-flipped .card-action { color: #b3cbd0; }
.card-reflection { display: block; width: 100%; min-height: 172px; margin-top: 5px; padding: 15px 4px 0; border-top: 1px solid #766473; text-align: left; }
.card-title { display: block; margin-bottom: 9px; color: #fff9ef; font: 400 clamp(1.15rem, 1.7vw, 1.5rem)/1.2 'Libre Baskerville', Georgia, serif; }
.card-meaning, .card-question { display: block; color: #e1d7dc; font-size: .88rem; line-height: 1.55; }
.card-question { margin-top: 10px; color: #f3dfca; }
.card:not(.is-flipped) .card-reflection { visibility: hidden; }
.next { margin: 0 clamp(22px, 4vw, 54px) 50px; padding: 23px 26px; border: 1px solid #876d78; border-radius: 6px; background: #3a2b40; }
.next strong { color: #fff6e9; font: 400 1.14rem 'Libre Baskerville', Georgia, serif; }
.next p { max-width: 820px; margin: 9px 0 17px; color: #e1d7dc; }
.next .button { border-color: #ead4c1; background: #ead4c1; color: var(--plum-deep) !important; }
.next .button:hover { background: #f8e9d7; }

.content { max-width: 820px; margin: 70px auto 0; }
.content h2 { margin: 28px 0 12px; font-size: clamp(1.5rem, 2.4vw, 2.05rem); }
.content p, .content li { color: var(--muted); line-height: 1.75; }
.content ul { padding-left: 1.25rem; }
.note { padding: 10px 0 10px 17px; border-left: 3px solid var(--gold); font-size: .9rem; }
.footer { padding: 30px 22px; background: var(--plum-deep); color: #f2e8e9; text-align: center; font-size: .82rem; }
.footer a { color: #e9c6d1; }
.footer p { margin: 6px 0; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr .7fr; }
  .hero-card { width: 143px; }
  .hero-art { min-height: 300px; }
  .cards { gap: 14px; }
  .card-face { border-width: 4px; }
}
@media (max-width: 700px) {
  .nav { width: min(100% - 32px, 1160px); min-height: 66px; }
  .navlinks { gap: 0; }
  .navlinks > a:not(.nav-cta) { display: none; }
  .nav-cta { min-height: 40px; padding: 9px 11px; font-size: .78rem; }
  main { width: min(100% - 28px, 1160px); padding-bottom: 60px; }
  .hero { display: block; min-height: 0; }
  .hero-copy { padding: 47px 6px 30px; }
  .hero h1 { font-size: clamp(2.35rem, 9vw, 3.8rem); }
  .hero-art { display: none; }
  .steps { flex-wrap: wrap; gap: 8px 12px; font-size: .62rem; }
  .steps span:not(:last-child)::after { width: 13px; }
  .reading-form { padding: 28px 20px; }
  .situations { grid-template-columns: 1fr; }
  .situation { min-height: 0; }
  .cards { grid-template-columns: 1fr; gap: 34px; padding: 8px 24px 37px; }
  .card { max-width: 360px; margin: auto; width: 100%; }
  .card-position { min-height: auto; }
  .card-flip { width: min(100%, 220px); }
  .card-reflection { min-height: 0; margin-top: 0; }
  .next { margin: 0 20px 28px; padding: 20px; }
  .content { margin: 47px 7px 0; }
}
@media (max-width: 430px) {
  .brand { font-size: 1.04rem; }
  .nav-cta { max-width: 129px; text-align: center; }
  .steps { display: none; }
  .hero-copy { padding-top: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-inner, .button, .nav-cta { transition: none; }
}
