/* CFAC Lykkehjul — thin badge-stil, sort/hvid med subtile animationer */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Manrope:wght@300;400;500&display=swap');

* {box-sizing: border-box;}
html, body {margin: 0; padding: 0; height: 100%;}
body {
    background:
        linear-gradient(rgba(8,8,8,0.70), rgba(8,8,8,0.70)),
        url('https://cookingforacause.dk/wp-content/uploads/2022/08/CookingForACause_RAISFOTO_069.jpg') center/cover no-repeat fixed;
    color: #ffffff;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300;
    overflow: hidden;
}

.cfac-lh-stage {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
}

/* Titel over hjulet — editorial Cormorant italic */
.cfac-lh-titel {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(36px, 5.5vw, 88px);
    line-height: 1;
    letter-spacing: -0.01em;
    color: #ffffff;
    text-align: center;
    margin: 0 0 24px 0;
    padding: 0 16px;
}
.cfac-lh-titel::after {
    content: "";
    display: block;
    width: 48px;
    height: 1px;
    background: rgba(255,255,255,0.6);
    margin: 18px auto 0;
}
@media (max-width: 640px) {
    .cfac-lh-titel {
        font-size: clamp(28px, 9vw, 48px);
        margin-bottom: 16px;
    }
    .cfac-lh-titel::after {margin-top: 12px;}
}

/* Board container */
.cfac-lh-board {
    position: relative;
    width: min(880px, 72vh, 86vw);
    aspect-ratio: 1;
    margin-bottom: 32px;
}

/* Pointer — slank hvid trekant fra højre side, pegende ind mod centrum */
.cfac-lh-pointer {
    position: absolute;
    top: 50%;
    right: -4px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-right: 28px solid #ffffff;
    z-index: 4;
    transform-origin: right center;
    animation: cfac-lh-pointer-wiggle 6s ease-in-out infinite;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
.cfac-lh-pointer::before {
    content: "";
    position: absolute;
    top: 50%;
    right: -10px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
}
@keyframes cfac-lh-pointer-wiggle {
    0%, 100% {transform: translateY(-50%) rotate(0deg);}
    48% {transform: translateY(-50%) rotate(-2.5deg);}
    52% {transform: translateY(-50%) rotate(2.5deg);}
}

/* Hjul — langsom idle drejning */
.cfac-lh-wheel {
    width: 100%;
    height: 100%;
    display: block;
    transform-origin: center;
    will-change: transform;
    border-radius: 50%;
    animation: cfac-lh-idle 90s linear infinite;
}
.cfac-lh-wheel.spinning {
    transition: transform 12s cubic-bezier(0.15, 0.6, 0.15, 1);
    animation: none;
}
.cfac-lh-wheel.stopped {
    animation: none;
}
@keyframes cfac-lh-idle {
    from {transform: rotate(0deg);}
    to {transform: rotate(360deg);}
}

/* Labels */
.cfac-lh-wheel text.label {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-weight: 300;
    font-style: italic;
    font-size: 20px;
    letter-spacing: 0.01em;
    dominant-baseline: middle;
    text-anchor: middle;
}

/* Logo i centrum — lille */
.cfac-lh-hublogo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10%;
    aspect-ratio: 1;
    object-fit: contain;
    z-index: 3;
    pointer-events: none;
    animation: cfac-lh-logo-pulse 4s ease-in-out infinite;
}
@keyframes cfac-lh-logo-pulse {
    0%, 100% {transform: translate(-50%, -50%) scale(1);}
    50%      {transform: translate(-50%, -50%) scale(1.04);}
}

/* Knapper — light-on-dark (mørk baggrund) */
.cfac-lh-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 24px;
}
.cfac-lh-btn {
    font-family: "Manrope", sans-serif;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-weight: 400;
    padding: 16px 56px;
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.85);
    cursor: pointer;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
    position: relative;
}
.cfac-lh-btn:hover:not(:disabled) {background: #ffffff; color: #000000; border-color: #ffffff;}
.cfac-lh-btn:disabled {opacity: 0.25; cursor: not-allowed; animation: none;}

#cfacLHDraw:not(:disabled) {
    animation: cfac-lh-draw-pulse 2.4s ease-in-out infinite;
}
@keyframes cfac-lh-draw-pulse {
    0%, 100% {box-shadow: 0 0 0 0 rgba(255,255,255,0.0);}
    50%      {box-shadow: 0 0 0 8px rgba(255,255,255,0.08);}
}

/* Fuld-skærm vinder-overlay — til storskærm */
.cfac-lh-overlay {
    position: fixed;
    inset: 0;
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    transition: opacity 0.7s ease, visibility 0.7s ease;
    overflow: hidden;
}
.cfac-lh-overlay.show {
    opacity: 1;
    visibility: visible;
}
.cfac-lh-overlay-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 32px;
    max-width: 95vw;
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.9s 0.2s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.9s 0.2s ease;
}
.cfac-lh-overlay.show .cfac-lh-overlay-inner {
    transform: translateY(0);
    opacity: 1;
}
.cfac-lh-overlay-tag {
    font-family: "Manrope", sans-serif;
    font-size: clamp(12px, 1.4vw, 18px);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    font-weight: 400;
    margin-bottom: 32px;
}
.cfac-lh-overlay-tag::before {
    content: "";
    display: inline-block;
    width: 36px;
    height: 1px;
    background: rgba(255,255,255,0.55);
    vertical-align: middle;
    margin-right: 16px;
    margin-bottom: 3px;
}
.cfac-lh-overlay-tag::after {
    content: "";
    display: inline-block;
    width: 36px;
    height: 1px;
    background: rgba(255,255,255,0.55);
    vertical-align: middle;
    margin-left: 16px;
    margin-bottom: 3px;
}
.cfac-lh-overlay-name {
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(64px, 14vw, 240px);
    line-height: 1;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0 0 56px 0;
    word-break: break-word;
}
.cfac-lh-overlay-name::after {
    content: ".";
    font-style: normal;
}
.cfac-lh-overlay.show .cfac-lh-overlay-name {
    animation: cfac-lh-name-reveal 1.3s 0.35s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
@keyframes cfac-lh-name-reveal {
    0%   {opacity: 0; transform: translateY(30px) scale(0.96); letter-spacing: 0.06em;}
    100% {opacity: 1; transform: translateY(0) scale(1); letter-spacing: -0.02em;}
}
.cfac-lh-overlay-btn {
    font-family: "Manrope", sans-serif;
    font-size: clamp(11px, 0.9vw, 13px);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-weight: 400;
    padding: 18px 64px;
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.7);
    cursor: pointer;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.cfac-lh-overlay-btn:hover {background: #ffffff; color: #000000; border-color: #ffffff;}

/* Konfetti — hvide prikker der flyver ud fra centrum */
.cfac-lh-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.cfac-lh-confetti span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 0;
    will-change: transform, opacity;
}
.cfac-lh-confetti span.square {
    border-radius: 0;
    transform-origin: center;
}
.cfac-lh-confetti span.outline {background: transparent; box-shadow: inset 0 0 0 1px #ffffff;}
.cfac-lh-confetti.fire span {
    animation: cfac-lh-confetti-fly 2.2s cubic-bezier(0.15, 0.6, 0.25, 1) forwards;
    animation-delay: var(--d, 0s);
}
@keyframes cfac-lh-confetti-fly {
    0%   {opacity: 0; transform: translate(-50%, -50%) translate(0, 0) scale(0);}
    20%  {opacity: 1;}
    100% {opacity: 0; transform: translate(-50%, -50%) translate(var(--cx), var(--cy)) rotate(var(--r, 0deg)) scale(1);}
}

/* Empty state */
.cfac-lh-empty {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Manrope", sans-serif;
    font-size: 13px;
    color: #888;
    letter-spacing: 0.06em;
    text-align: center;
    padding: 24px;
}

/* Reduced motion: stop alle automatiske animationer */
@media (prefers-reduced-motion: reduce) {
    .cfac-lh-wheel, .cfac-lh-pointer, .cfac-lh-hublogo, #cfacLHDraw {animation: none !important;}
    .cfac-lh-confetti {display: none;}
}

/* Mobile */
@media (max-width: 640px) {
    .cfac-lh-stage {padding: 16px 8px;}
    .cfac-lh-board {margin-bottom: 28px;}
    .cfac-lh-wheel text.label {font-size: 14px;}
    .cfac-lh-btn {padding: 14px 42px; font-size: 10px;}
    .cfac-lh-pointer {border-left-width: 8px; border-right-width: 8px; border-top-width: 24px;}
}
