:root {
  --bg-a: #210044;
  --bg-b: #56088e;
  --accent: #f8c96d;
  --txt: #fff;
  --txt-faint: #ccc;
  --footer-bg: #0b091c;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* GLOBAL */
body {
    font-family: 'Cormorant Garamond', serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: var(--txt);
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.08), transparent 70%),
        radial-gradient(circle at center, #5a3591 0%, #06030a 100%);
    overflow-x: hidden;
}

canvas#star {
    position: fixed;
    inset: 0;
    z-index: -2;
}

.sweep {
    position: fixed;
    top: -30%;
    left: -25%;
    width: 160vw;
    height: 160vh;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(circle at 50% 25%, rgba(255, 255, 255, .13), transparent 60%);
    animation: sweep 14s ease-in-out infinite;
}

@keyframes sweep {
    0% { transform: translateX(0) rotate(-18deg); }
    50% { transform: translateX(38vw) rotate(18deg); }
    100% { transform: translateX(0) rotate(-18deg); }
}

/* HEADER */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: relative;
    z-index: 1;
}
.logo {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.9rem;
    color: var(--text-light);
    text-decoration: none;
}
.header-controls {
    display: flex;
    align-items: center;
}

header select {
  background: transparent;
  border: 1px solid var(--txt);
  color: var(--txt);
  padding: .25rem .6rem;
  border-radius: 4px;
  margin-right: 1rem;
}

header button {
  background: none;
  border: none;
  color: var(--txt-faint);
  font-size: 1.2rem;
  margin-left: .7rem;
  cursor: pointer;
}

header button:hover {
  color: var(--txt);
}

/* HERO & FAN */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 280px;
}

#fanWrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 340px;
  transition: opacity .6s ease;
  margin-top: -8rem;
}

#fan {
  position: relative;
  width: 100%;
  height: 340px;
}

.card {
  --w: 118px;
  --h: 170px;
  width: var(--w);
  height: var(--h);
  position: absolute;
  transform-style: preserve-3d;
  cursor: pointer;
  /*transition: transform .55s ease, box-shadow .35s, opacity .35s;*/
  transition: 
            transform .9s cubic-bezier(.25,.7,.3,1),
            width 1.8s cubic-bezier(.25,.7,.3,1),
            height 1.8s cubic-bezier(.25,.7,.3,1),
            box-shadow .35s,
            opacity .35s;
}

.card:hover {
  box-shadow: 0 0 12px 4px var(--accent);
}

.card.fade {
  opacity: .05;
  pointer-events: none;
}

.face {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  backface-visibility: hidden;
  overflow: hidden;
}

.back {
  background: #2e1b53;
  border: 1px solid #4f3a75;
  box-shadow: 0 0 4px rgba(0, 0, 0, .6);
  background-image:
    linear-gradient(135deg, transparent 45%, rgba(0, 0, 0, .1) 46%, rgba(0, 0, 0, .1) 53%, transparent 54%),
    radial-gradient(circle at center, #BFA46F 0 10%, transparent 11%),
    radial-gradient(circle at center, #D4AF37 0 15%, transparent 16%),
    repeating-radial-gradient(circle at center, transparent 0 40%, #D4AF37 9% 10%);
  background-size: 200% 200%, 100%, 100%, 8px 8px;
}

.back::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='122' height='174' viewBox='0 0 122 174' fill='none' stroke='%23FFD700' stroke-width='1.2'><path d='M61 20v134M21 87h80'/><circle cx='61' cy='87' r='40'/><path d='M61 47a40 40 0 110 80 40 40 0 010-80z' opacity='.6'/><path d='M61 55a32 32 0 110 64 32 32 0 010-64z' opacity='.4'/></svg>") center/contain no-repeat;
  opacity: 0.22;
  pointer-events: none;
}

/* Container in which the image resides*/
.front {
    padding-top: 5px;
    padding-left: 5px;
    background: #fff;
    transform: rotateY(180deg);
}

/*Controls the zooming of the image in the card*/
.front img {
    width: 100%;
    height: 108%;
}

#prompt {
  position: absolute;
  top: 69%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.8rem;
  color: var(--accent);
  text-shadow:
    0 0 8px var(--accent),
    0 0 24px var(--accent),
    0 0 32px var(--accent);
}

#prompt-before {
  position: absolute;
  top: 54%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.2rem;
  color: var(--txt);
  text-shadow:
    0 0 8px var(--accent),
    0 0 16px var(--accent),
    0 0 32px var(--accent);
}


#prompt-after {
  position: absolute;
  top: 185%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.4rem;
  color: var(--txt);
  text-shadow:
    0 0 8px var(--accent),
    0 0 32px var(--accent);
}

/* Animation Classes */
.card.init {
  opacity: 0;
  transform-origin: center bottom;
}

.card.init.show {
  opacity: 1;
}

@keyframes spark {
  0% { opacity: 0; transform: scale(.2); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.8); }
}

.spark {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  pointer-events: none;
  background: radial-gradient(circle, var(--accent) 0 20%, transparent 22%);
  animation: spark .8s ease-out forwards;
}

/* RESULT */
#result {
  display: none;
  max-width: 1200px;
  margin: 4rem auto 0;
  padding: 0 1rem;
  gap: 2rem;
  align-items: flex-start;
  opacity: 0;
  transition: opacity .6s ease;
}

#result.show {
  opacity: 1;
}

.view {
  flex: 0 0 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5rem;
}

.view .card {
  --w: 238px;
  --h: 344px;
  cursor: default;
  /*animation: dock .9s cubic-bezier(.25, .7, .3, 1) forwards;
  transition: box-shadow .35s;*/
}

.view .card:hover {
  box-shadow: 0 0 12px 4px var(--accent);
}

.card-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.5rem;
  color: var(--accent);
  margin-top: .8rem;
  text-align: center;
  text-shadow: 0 0 10px var(--accent);

}

@keyframes dock {
  from { transform: scale(.8) rotateY(180deg); }
  to { transform: scale(1) rotateY(180deg); }
}

.info {
  flex: 1;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .2);
  padding: 2rem;
  border-radius: 12px;
  font-size: 1.2rem;
  line-height: 1.55;
  opacity: 0;
  animation: fade .9s .4s forwards;
}

@keyframes fade {
  to { opacity: 1; }
}

.info h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.55rem;
  color: var(--accent);
  margin-bottom: .4rem;
}

.info h3 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.55rem;
  margin-bottom: 1rem;
}

.info strong {
  color: var(--accent);
}

.info button {
  margin-top: 1.8rem;
  padding: .72rem 1.5rem;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: 'Cinzel Decorative', serif;
  font-size: 1rem;
  cursor: pointer;
  transition: box-shadow .3s;
}

.info button:hover {
  box-shadow: 0 0 12px var(--accent);
}


/*SECTION DIVIDER & SEO CARDS (from homepage.css)*/
.section-divider {
  border: none;
  border-top: 1px solid var(--accent);
  margin: 3rem auto;
  width: 80%;
  position: relative;
  z-index: 1;
}

.seo-cards-container {
  padding: 0 1rem 3rem;
  position: relative;
  z-index: 1;
}
.seo-card {
  max-width: 800px;
  margin: 2rem auto;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 2rem;
}
.seo-card h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.75rem;
  color: var(--accent);
  text-align: center;
  margin-bottom: 1rem;
}
.seo-card p {
  font-size: 1rem;
  color: var(--txt-faint);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/*─────────────────────────────────────────────────────────────────────────
  FOOTER – homepage.css styles
──────────────────────────────────────────────────────────────────────────*/
.site-footer {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 2rem;
  background: var(--footer-bg);
  color: var(--txt-faint);
  padding: 2.5rem 2rem 1rem;
  position: relative;
  z-index: 1;
}

.footer-brand {
  margin-bottom: 2rem;
}
.footer-brand h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.5rem;
  color: var(--txt);
  margin-bottom: 0.5rem;
}
.footer-brand p {
  max-width: 400px;
  line-height: 1.4;
  color: var(--txt-faint);
}
.footer-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-col {
  flex: 1;
  min-width: 140px;
}
.footer-col h4 {
  position: relative;
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 40px; height: 2px;
  background: var(--accent);
}
.footer-col a {
  display: block;
  color: var(--txt-faint);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.3s, text-shadow 0.3s;
}
.footer-col a:hover {
  color: var(--accent);
  text-shadow: 0 0 6px var(--accent);
}
.footer-col a i {
  margin-right: 0.5rem;
}
.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  text-align: center;
}
.footer-bottom p {
  font-size: 1.1rem;
  color: var(--txt-faint);
}
/* end of footer*/

/* keep a selected card raised & glowing */
.card.selected {
  /* remove position:relative so it stays absolute in the fan */
  top: -12px;
  box-shadow: 0 0 12px 4px var(--accent);
  z-index: 10;
}

/* stack the 3 result sections vertically */
#result {
  display: none;              /* still hidden until 3rd pick */
  flex-direction: column;
  gap: 4rem;
}

/* individual past/present/future rows */
.result-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* reuse your existing .view/.info sizing inside each row */
.result-section .view {
  flex: 0 0 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
}


/* ── 1. “Your Reading” header ── */
.reading-header {
  margin-left: auto;
  margin-right: auto;
}
.reading-header i {
  color: var(--accent);
  font-size: 2.2rem;
}
.reading-header h2 {
  font-size: 2.5rem;
  color: #fff;
  text-shadow: 0 0 8px var(--accent);
  margin-top: .5rem;
  font-family: 'Cormorant Garamond', serif;
}

/* ── 2. Draw Again button ── */
.draw-again {
  margin-left: auto;
  margin-right: auto;
}
#again {
  padding: 0.72rem 1.5rem;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.5em;
  cursor: pointer;
  transition: box-shadow .3s ease;
}
#again:hover {
  box-shadow: 0 0 12px var(--accent);
}

/* ── Psychic CTA (match page purple) ── */
.psychic-help {
    margin-left: auto;
    margin-right: auto;
    padding: 0rem 1rem;
    border-radius: 8px;
    margin-top: 4rem;
}
.psychic-help__inner {
  max-width: 800px;
  text-align: center;
  border-radius: 12px;
  padding: 2rem;
}
.psychic-help__inner h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.8rem;
  color: #fff;
  text-shadow: 0 0 8px var(--accent);
}
.psychic-help__inner p {
  margin-top: 1rem;
  line-height: 1.5;
  color: var(--txt);
}
.psychic-help__price {
  margin: 1.5rem 0;
  font-size: 1.2rem;
  color: var(--accent);
}
.psychic-help__btn {
  display: inline-block;
  padding: .72rem 1.8rem;
  background: var(--accent);
  color: var(--bg-a);
  border-radius: 6px;
  font-family: 'Cinzel Decorative', serif;
  font-size: 1rem;
  text-decoration: none;
  transition: box-shadow .3s ease;
}
.psychic-help__btn:hover {
  box-shadow: 0 0 12px var(--accent);
}
/* end of Pshychic section designs*/

/* ── Draw-all button (For mobile only) ── */
.draw-all {
  display: none;
  margin: 1.5rem auto 0;
  padding: .72rem 1.5rem;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: 'Cinzel Decorative', serif;
  font-size: 1rem;
  cursor: pointer;
  transition: box-shadow .3s ease;
}
.draw-all:hover {
  box-shadow: 0 0 12px var(--accent);
}

/* ── Collapsible FAQ Section ── */
.faq-section {
  margin: 0rem 2rem 2rem 1rem;
  padding: 0 1rem;
  color: var(--txt);
  z-index: 1;
}

.faq-section h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.9rem;
  color: var(--accent);
  text-align: center;
  margin-bottom: 1.5rem;
}

.faq-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem;
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.2rem;
  color: var(--accent);
  position: relative;
}

.faq-item summary::marker {
  /* Hide default marker (for Firefox) */
  color: transparent;
}

.faq-item summary::-webkit-details-marker {
  /* Hide default marker (for WebKit/Blink) */
  display: none;
}

.faq-item summary::after {
  content: '⌄';
  position: absolute;
  right: 1rem;
  transition: transform 0.3s ease;
  font-size: 1.2rem;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 1rem 1rem 1rem;
  font-size: 1.3rem;
  color: var(--txt-faint);
  line-height: 1.6;
}

/* ── End of FAQ Section ── */

/* RESPONSIVE */
@media (max-width: 768px){

    /* 1 ▸ deck area & cards shrink */
    #fanWrap          { height: 260px; }
    #fan              { height: 200px; overflow: visible; }
    #fan .card        { --w: 90px;  --h: 130px; }

    /* 2 ▸ prompt moves *below* the deck and uses a smaller font */
    #prompt{
        position: static;
        transform: none;
        margin-top: 1rem;
        font-size: 1.4rem;
        text-align: center;
    }

    .draw-all {
        display: block;
    }

    /* 3 ▸ result panel centres the drawn card  */
    .view{
        flex: 0 0 auto;
        width: 100%;
        align-items: center;   /* horizontal centring */
    }
    .view .card      { 
        --w: 180px; 
        --h: 260px; 
    }  /* phone-friendly size */

    #fan .card:hover{
        transform: translateY(-6px) scale(1.08);
        box-shadow: 0 0 12px 4px var(--accent);
    }

    /* make the details panel appear below the card */
    .result-section {
        flex-direction: column;
        align-items: center;
    }
    .result-section .view,
    .result-section .info {
        flex: none;
        width: 100%;
    }
    .result-section .view {
        margin-bottom: 1.5rem;
    }
    /* end of result-section */

    .info {
        /* opt out of flex:1 so width:100% actually takes effect */
        flex: none;
        width: 100%;
    }
    
    /*Controls responsive behaviour of header only*/
    .logo {
        font-family: 'Cinzel Decorative', serif;
        font-size: 1.4rem;
        color: var(--text-light);
        text-decoration: none;
    }
    .menu-btn, .mute-btn{
        display: none;
    }
    /*end of responsive header*/

    .hero {
        padding-bottom: 30px;
    }

    #fanWrap {
        margin-top: 1.8rem;
        margin-left: 8.5%;
    }

    /*Reading header*/
    .reading-header i {
        color: var(--accent);
        font-size: 1.5rem;
    }
    .reading-header h2 {
        font-size: 1.5rem;
        margin-top: .5rem;
    }
    /* End of reading headers*/

    /* Responsive texts around deck*/
    #prompt-before {
        position: absolute;
        top: 8%;
        left: 68%;
        width: 100%;
        transform: translate(-50%, -50%);
        font-family: 'Cinzel Decorative', serif;
        font-size: 1rem;
        color: var(--txt);
        text-shadow:
            0 0 8px var(--accent),
            0 0 16px var(--accent),
            0 0 32px var(--accent);
    }

    #prompt-after {
        position: absolute;
        top: 155%;
        left: 62%;
        width: 100%;
        transform: translate(-50%, -50%);
        font-family: 'Cinzel Decorative', serif;
        font-size: 1.1rem;
        color: var(--txt);
        text-shadow:
            0 0 8px var(--accent),
            0 0 32px var(--accent);
    }
    /* End of responsive text around deck */

    /* Start of responsive heading of interpretation box*/
    .info h2 {
        font-size: 1.8rem;
    }
    /* End of responsive heading of interpretation box*/

    /* Start of responsive FAQ */
    .faq-section h2 {
        font-size: 1.2rem;
    }
    /* End of responsive FAQ */

    /* Start of responsive footer */
    .site-footer {
        display: block;
    }
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    .footer-col {
        width: 100%;
        text-align: center;
    }
    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    /* End of footer */

}
