/* "Meet the Squad" page - playful polaroid cards in the wedding palette (navy #121F38, orange #E47A2E, cream). */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; font-family: "Montserrat", Arial, sans-serif; color: #24303f; overflow-x: hidden;
    background-color: #FFF8F0;
    background-image: radial-gradient(rgba(228,122,46,.10) 1.2px, transparent 1.6px);
    background-size: 22px 22px;
}
a { color: inherit; text-decoration: none; }

.sq-backlink {
    position: fixed; top: 14px; left: 14px; z-index: 50; padding: 8px 16px; border-radius: 99px; font-weight: 600; font-size: 14px;
    background: rgba(18,31,56,.9); color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.2); transition: transform .2s;
}
.sq-backlink:hover { transform: translateX(-3px); }

/* ---------- hero ---------- */
.sq-hero {
    position: relative; overflow: hidden; text-align: center; color: #fff; padding: 110px 20px 90px;
    background: radial-gradient(circle at 50% 0%, #2a3f6b 0%, #121F38 70%);
    clip-path: ellipse(120% 100% at 50% 0%);
}
.sq-kicker { margin: 0; letter-spacing: 5px; text-transform: uppercase; font-size: 13px; color: #f3d9b5; animation: sqUp .7s ease .1s both; }
.sq-hero h1 {
    margin: 8px 0 6px; font-family: "Great Vibes", cursive; font-weight: 400; font-size: clamp(3.2rem, 11vw, 6rem); line-height: 1.1;
    color: #E47A2E; animation: sqPop .9s cubic-bezier(.3,1.5,.5,1) .25s both;
}
.sq-intro { max-width: 620px; margin: 0 auto; color: rgba(255,255,255,.85); animation: sqUp .7s ease .5s both; }
.sq-count { margin: 18px 0 0; font-size: 14px; color: #F5D88A; animation: sqUp .7s ease .7s both; }
.sq-count b { font-size: 1.3rem; }
.sq-floaters span {
    position: absolute; bottom: -40px; left: var(--x); font-size: calc(22px * var(--s)); opacity: .55;
    animation: sqFloat 9s linear infinite; animation-delay: calc(var(--d) * -1);
}
@keyframes sqFloat {
    0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: .6; }
    100% { transform: translateY(-520px) rotate(40deg); opacity: 0; }
}
@keyframes sqUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes sqPop { from { opacity: 0; transform: scale(.6) rotate(-6deg); } to { opacity: 1; transform: none; } }

/* ---------- toolbar ---------- */
.sq-toolbar { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; margin: -26px auto 10px; padding: 0 16px; position: relative; z-index: 3; }
.sq-filters { display: flex; gap: 6px; background: #fff; padding: 6px; border-radius: 99px; box-shadow: 0 10px 26px rgba(18,31,56,.12); }
.sq-filters button { border: 0; background: transparent; padding: 10px 18px; border-radius: 99px; font: 600 14px "Montserrat", sans-serif; color: #121F38; cursor: pointer; transition: background .25s, color .25s; }
.sq-filters button.on { background: #121F38; color: #fff; }
.sq-spin {
    border: 0; cursor: pointer; padding: 13px 22px; border-radius: 99px; font: 700 14px "Montserrat", sans-serif; color: #fff;
    background: linear-gradient(90deg, #E47A2E, #E91E63); box-shadow: 0 10px 26px rgba(233,30,99,.3); transition: transform .2s;
}
.sq-spin:hover { transform: translateY(-2px) rotate(-1deg); }
.sq-spin:disabled { opacity: .7; cursor: wait; }

/* ---------- polaroid flip cards ---------- */
.sq-grid {
    max-width: 1180px; margin: 30px auto 40px; padding: 0 18px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 34px 26px;
}
.sq-card {
    perspective: 1200px; cursor: pointer; outline: none; transform: rotate(var(--tilt));
    animation: sqDrop .8s cubic-bezier(.3,1.4,.5,1) backwards; animation-delay: calc(.3s + var(--i) * 90ms);
    transition: transform .4s cubic-bezier(.3,1.4,.5,1);
}
.sq-card:hover, .sq-card:focus-visible { transform: rotate(0) scale(1.04); z-index: 2; }
.sq-card:focus-visible .sq-face { box-shadow: 0 0 0 3px #F5C518, 0 18px 40px rgba(18,31,56,.22); }
.sq-card.hide { display: none; }
@keyframes sqDrop { from { opacity: 0; transform: translateY(-60px) rotate(calc(var(--tilt) * 4)); } to { opacity: 1; transform: rotate(var(--tilt)); } }

.sq-inner { position: relative; display: grid; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3,1.2,.5,1); }
.sq-card.flipped .sq-inner { transform: rotateY(180deg); }
.sq-face {
    grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 6px;
    background: #fff; padding: 14px 14px 18px; box-shadow: 0 14px 32px rgba(18,31,56,.16); text-align: center;
    display: flex; flex-direction: column; align-items: center;
}
.sq-back { transform: rotateY(180deg); background: radial-gradient(circle at 80% 0%, #2a3f6b 0%, #121F38 70%); color: #fff; justify-content: center; padding: 22px 18px; }

.sq-tape {
    position: absolute; top: -12px; left: 50%; width: 92px; height: 26px; margin-left: -46px; transform: rotate(-4deg);
    background: rgba(245,216,138,.75); box-shadow: 0 2px 4px rgba(0,0,0,.08);
}
.sq-photo { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #f3ece4; }
.sq-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease, filter .6s ease; }
.sq-card:hover .sq-photo img { transform: scale(1.08); filter: saturate(1.2); }
.sq-front h2 { margin: 14px 0 2px; font-family: "Caveat", cursive; font-size: 1.9rem; color: #121F38; line-height: 1.1; }
.sq-nick { margin: 0 0 6px; color: #c25e17; font-style: italic; font-size: .92rem; }
.sq-title {
    display: inline-block; margin-top: 6px; padding: 6px 12px; border-radius: 99px; font-size: .8rem; font-weight: 700;
    background: #fff1e6; color: #c25e17; border: 1px solid #f3c39e;
}
.sq-hint { margin-top: 10px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #a3a8ae; }
.sq-back .sq-hint { color: rgba(255,255,255,.5); }
.sq-back-name { margin: 0; font-family: "Great Vibes", cursive; font-size: 2.2rem; color: #F5D88A; line-height: 1.1; }
.sq-role { margin: 2px 0 10px; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.7); }
.sq-bio { margin: 0 0 14px; font-size: .92rem; line-height: 1.55; color: rgba(255,255,255,.9); white-space: pre-line; }
.sq-muted { color: rgba(255,255,255,.6); font-style: italic; }
.sq-contact { width: 100%; padding: 10px 12px; margin-bottom: 12px; border: 1px dashed rgba(245,216,138,.5); border-radius: 12px; }
.sq-contact small { display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.6); }
.sq-contact strong { color: #fff; }
.sq-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.sq-btns a { padding: 9px 14px; border-radius: 99px; font-weight: 700; font-size: 13px; color: #fff; transition: transform .2s; }
.sq-btns a:hover { transform: translateY(-2px); }
.sq-call { background: #E47A2E; }
.sq-wa { background: #25D366; }
.sq-social { display: flex; gap: 12px; justify-content: center; }
.sq-social a { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.35); }
.sq-social a:hover { background: #E47A2E; border-color: #E47A2E; }

/* ---------- the dance-floor game ---------- */
.sq-card.lit .sq-front { box-shadow: 0 0 0 4px #F5C518, 0 0 30px rgba(245,197,24,.7); }
.sq-card.winner { animation: sqWin 1s ease 3; z-index: 3; }
.sq-card.winner .sq-front { box-shadow: 0 0 0 5px #E91E63, 0 0 40px rgba(233,30,99,.6); }
@keyframes sqWin { 0%, 100% { transform: rotate(0) scale(1.06); } 25% { transform: rotate(-4deg) scale(1.1); } 75% { transform: rotate(4deg) scale(1.1); } }
.sq-toast {
    position: fixed; left: 50%; bottom: 26px; z-index: 60; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
    background: #121F38; color: #fff; padding: 14px 22px; border-radius: 18px; font-weight: 600; text-align: center;
    box-shadow: 0 16px 34px rgba(0,0,0,.3); transition: opacity .4s, transform .4s; max-width: calc(100vw - 32px);
}
.sq-toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti-canvas { position: fixed; inset: 0; z-index: 55; pointer-events: none; }

.sq-empty { text-align: center; font-size: 1.1rem; margin: 50px 20px; }
.sq-foot { text-align: center; padding: 30px 20px 50px; color: #6b7680; }
.sq-home { display: inline-block; padding: 13px 24px; border-radius: 99px; background: #E47A2E; color: #fff; font-weight: 700; box-shadow: 0 10px 24px rgba(228,122,46,.35); transition: transform .2s; }
.sq-home:hover { transform: translateY(-2px); }

@media (max-width: 560px) {
    .sq-hero { padding: 90px 16px 80px; }
    .sq-grid { grid-template-columns: 1fr 1fr; gap: 24px 14px; padding: 0 12px; }
    .sq-front h2 { font-size: 1.45rem; }
    .sq-title { font-size: .7rem; padding: 5px 9px; }
    .sq-back { padding: 16px 10px; }
    .sq-back-name { font-size: 1.7rem; }
    .sq-bio { font-size: .8rem; }
    .sq-btns a { padding: 8px 10px; font-size: 12px; }
    .sq-spin { font-size: 13px; padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .sq-floaters { display: none; }
}
