/* ============================================================
   Rejoice Matrimony — design system on top of Tailwind utilities
   Crimson / cream / gold theme (see moodboard).
   ============================================================ */

:root {
    --brand-50: #fff1f1;
    --brand-100: #ffe0e0;
    --brand-600: #d01e2a;
    --brand-700: #b3121f;
    --brand-800: #930f1c;
    --brand-900: #7a111c;
    --brand-950: #4a050b;
    --gold-300: #ecc552;
    --gold-400: #e6ad2b;
    --gold-500: #d99214;
    --ink: #17211f;
    --cream: #fdf8f4;
    --line: #ece4de;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---------- form controls ---------- */

.label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.4rem;
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid #e3e6ea;
    border-radius: 0.55rem;
    background: #fff;
    padding: 0.62rem 0.85rem;
    font-size: 0.9rem;
    color: #1f2937;
    outline: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input::placeholder,
.textarea::placeholder {
    color: #9aa3ae;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: #f8656b;
    box-shadow: 0 0 0 3px rgba(236, 58, 66, 0.12);
}

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23334155' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1em;
    padding-right: 2.4rem;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--brand-600);
}

input[type="range"] {
    accent-color: var(--brand-600);
}

.field-error {
    color: #dc2626;
    font-size: 0.78rem;
    margin-top: 0.3rem;
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0.55rem;
    padding: 0.65rem 1.4rem;
    transition: all 0.18s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(180deg, #e5303a 0%, var(--brand-600) 45%, var(--brand-800) 100%);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(147, 15, 28, 0.6);
}

.btn-primary:hover {
    filter: brightness(1.06);
    box-shadow: 0 10px 22px -8px rgba(147, 15, 28, 0.75);
}

.btn-gold {
    background: linear-gradient(180deg, #fde08e, #f2b23a);
    color: #2b1700;
    box-shadow: 0 8px 18px -8px rgba(217, 146, 20, 0.6);
}

.btn-gold:hover {
    filter: brightness(1.05);
}

.btn-outline {
    border: 1px solid var(--brand-600);
    color: var(--brand-700);
    background: #fff;
}

.btn-outline:hover {
    background: var(--brand-50);
}

.btn-white {
    background: #fff;
    color: var(--brand-800);
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.35);
}

.btn-white:hover {
    background: var(--brand-50);
}

.btn-soft {
    background: #f1f3f5;
    color: #334155;
}

.btn-soft:hover {
    background: #e5e8eb;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-success {
    background: linear-gradient(180deg, #22a35a, #15803d);
    color: #fff;
}

.btn-success:hover {
    filter: brightness(1.06);
}

.btn-sm {
    padding: 0.42rem 0.95rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.85rem 1.8rem;
    font-size: 1rem;
}

/* ---------- cards & chips ---------- */

.card {
    background: #fff;
    border-radius: 0.9rem;
    box-shadow: 0 10px 30px -18px rgba(90, 20, 10, 0.28);
    border: 1px solid var(--line);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.22rem 0.7rem;
    background: var(--brand-50);
    color: var(--brand-700);
    border: 1px solid var(--brand-100);
}

.chip-match {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.18rem 0.6rem;
    background: #e6f7ec;
    color: #23864d;
}

/* ---------- hero ---------- */

.hero-gradient {
    background:
        radial-gradient(900px 420px at 85% -10%, rgba(242, 179, 58, 0.18), transparent 60%),
        linear-gradient(110deg, #4a060d 0%, #7b111b 55%, #5a1208 100%);
}

.hero-rings {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.5;
}

@keyframes floatHeart {
    0% { transform: translateY(110vh) scale(0.6) rotate(-8deg); opacity: 0; }
    12% { opacity: 0.5; }
    100% { transform: translateY(-15vh) scale(1.1) rotate(10deg); opacity: 0; }
}

.floating-heart {
    position: absolute;
    bottom: -10vh;
    font-size: 22px;
    animation: floatHeart linear infinite;
    opacity: 0;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-up {
    animation: fadeUp 0.7s ease both;
}

.fade-up-1 { animation-delay: 0.08s; }
.fade-up-2 { animation-delay: 0.18s; }
.fade-up-3 { animation-delay: 0.3s; }

.text-gold-gradient {
    background: linear-gradient(110deg, #f9e9b8, #ecc552 40%, #fdf3cf 60%, #e6ad2b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- profile cards ---------- */

.profile-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 45px -18px rgba(90, 20, 10, 0.35);
}

.photo-blur img {
    filter: blur(14px) saturate(1.1);
    transform: scale(1.12);
}

/* ---------- chat ---------- */

.bubble-me {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    color: #fff;
    border-radius: 1.1rem 1.1rem 0.25rem 1.1rem;
}

.bubble-them {
    background: #fff;
    color: #1f2937;
    border: 1px solid #eee;
    border-radius: 1.1rem 1.1rem 1.1rem 0.25rem;
}

.chat-scroll {
    scrollbar-width: thin;
    scrollbar-color: #e8b4b0 transparent;
}

.chat-scroll::-webkit-scrollbar {
    width: 6px;
}

.chat-scroll::-webkit-scrollbar-thumb {
    background: #f0c4bf;
    border-radius: 6px;
}

/* ---------- toast ---------- */

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast {
    animation: toastIn 0.35s ease both;
}

/* ---------- progress ring ---------- */

.ring-track { stroke: #fbe3df; }
.ring-fill {
    stroke: url(#ringGradient);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

/* ---------- misc ---------- */

.divider-heart {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gold-500);
}

.divider-heart::before,
.divider-heart::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #f0c4bf, transparent);
}

@keyframes confettiFall {
    0% { transform: translateY(-10vh) rotate(0); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

.confetti {
    position: fixed;
    top: -10vh;
    width: 10px;
    height: 16px;
    border-radius: 2px;
    animation: confettiFall 3.2s ease-in forwards;
    z-index: 60;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.62rem 0.95rem;
    border-radius: 0.6rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #f1cfc8;
    transition: all 0.15s;
}

.sidebar-link svg {
    color: #e9b96a;
    opacity: 0.85;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(242, 178, 58, 0.22), rgba(255, 255, 255, 0.06));
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #f2b23a;
}

.sidebar-link.active svg {
    color: #fde08e;
    opacity: 1;
}

/* ---------- moodboard components ---------- */

/* Cream page canvas with peach floral line-art in the corners. */
.page-canvas {
    position: relative;
    background-color: var(--cream);
    isolation: isolate;
}

.page-canvas::before,
.page-canvas::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 22rem;
    height: 22rem;
    background: url('/images/home/floral-corner.jpg') top right / contain no-repeat;
    mix-blend-mode: multiply;
    opacity: 0.45;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at top right, #000 30%, transparent 70%);
    mask-image: radial-gradient(ellipse 100% 100% at top right, #000 30%, transparent 70%);
}

.page-canvas::before {
    top: 0;
    left: 0;
    transform: scaleX(-1);
}

.page-canvas::after {
    right: 0;
    bottom: 0;
    transform: scaleY(-1);
}

/* Serif section / page titles: ink with an optional crimson accent. */
.title-display {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.1;
}

.title-display .accent,
.text-accent {
    color: var(--brand-700);
}

/* Soft pink circle holding a crimson icon. */
.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    background: #fde8e1;
    color: var(--brand-600);
}

.icon-badge-solid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 9999px;
    background: linear-gradient(180deg, #ec3a42, var(--brand-700));
    color: #fff;
    box-shadow: 0 6px 14px -6px rgba(147, 15, 28, 0.6);
}

/* Segmented control (Bride / Groom, Login / By Profile ID). */
.seg {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 0.6rem;
    background: #f1f2f4;
}

.seg > * {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 0.45rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
}

.seg > .is-active,
.seg > input:checked + span,
.seg label:has(input:checked) {
    background: #fff;
    color: var(--brand-700);
    box-shadow: 0 0 0 1px #f8656b, 0 4px 10px -6px rgba(147, 15, 28, 0.4);
}

.seg-solid > .is-active,
.seg-solid label:has(input:checked) {
    background: linear-gradient(180deg, #e5303a, var(--brand-700));
    color: #fff;
    box-shadow: 0 6px 14px -8px rgba(147, 15, 28, 0.7);
}

/* Pill tabs (Featured filters, Interests tabs, Blog categories). */
.tab-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 9999px;
    padding: 0.45rem 1.1rem;
    font-size: 0.84rem;
    font-weight: 500;
    color: #334155;
    transition: all 0.15s;
    white-space: nowrap;
}

.tab-pill:hover {
    color: var(--brand-700);
}

.tab-pill.is-active {
    background: linear-gradient(180deg, #e5303a, var(--brand-700));
    color: #fff;
    box-shadow: 0 6px 14px -8px rgba(147, 15, 28, 0.7);
}

/* Underline tabs (profile details: About / Family / Education ...). */
.tab-line {
    position: relative;
    padding: 0.7rem 0.2rem;
    font-size: 0.86rem;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
}

.tab-line.is-active {
    color: var(--brand-700);
    font-weight: 600;
}

.tab-line.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand-600);
}

/* Member-area sidebar (light, moodboard style). */
.member-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.62rem 0.9rem;
    border-radius: 0.6rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    transition: all 0.15s;
}

.member-link svg {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    color: var(--brand-600);
}

.member-link:hover {
    background: #fff5f3;
    color: var(--brand-700);
}

.member-link.is-active {
    background: linear-gradient(90deg, #ffe9e6, #fff5f3);
    color: var(--brand-700);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--brand-600);
}

/* Faded sepia palace illustration used behind page headers. */
.palace-sketch {
    pointer-events: none;
    filter: sepia(0.55) saturate(0.8) brightness(1.08);
    mix-blend-mode: multiply;
    opacity: 0.38;
}
