/* =================================================================
   Medigenix — Reference Palette (Warm Ivory, Charcoal & Antique Gold)
   Loaded globally; complements Tailwind utilities.
   ================================================================= */

:root {
    --ink: #f7f2e8;
    --jade: #f3ede2;
    --champagne: #9a8238;
    --ivory: #171715;
}

/* Smooth anchor scrolling with sticky-nav offset */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 88px; }

/* ===== Typography defaults ===== */
body {
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-serif {
    font-family: 'Fraunces', Georgia, serif;
    font-optical-sizing: auto;
}

/* ===== Reusable background textures ===== */

/* Fine grain — subtle warm paper texture */
.bg-grain {
    position: relative;
}
.bg-grain::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(23,23,21,0.045) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: 0.6;
}

/* Hairline grid — nearly invisible, keeps large ivory sections from feeling flat */
.bg-lotus-grid {
    background-image:
        linear-gradient(rgba(154,130,56,0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(154,130,56,0.055) 1px, transparent 1px);
    background-size: 64px 64px;
}

/* Soft ivory/gold glow */
.glow-jade {
    background: radial-gradient(circle at center, rgba(229,218,198,0.75) 0%, rgba(247,242,232,0.15) 45%, transparent 70%);
}

/* Antique-gold vignette */
.glow-champagne {
    background: radial-gradient(circle at center, rgba(154,130,56,0.16) 0%, transparent 60%);
}

/* ===== Buttons ===== */

/* Primary — charcoal pill, as shown in the reference */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.75rem;
    border-radius: 9999px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #f7f2e8;
    background: #151514;
    box-shadow: 0 12px 28px -14px rgba(21,21,20,0.65), inset 0 1px 0 rgba(255,255,255,0.08);
    transition: transform 0.3s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.3s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px -16px rgba(21,21,20,0.75), inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-primary:active { transform: translateY(0); }

/* Secondary — ivory/transparent pill with charcoal text */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.75rem;
    border-radius: 9999px;
    font-weight: 600;
    color: #171715;
    background: rgba(247,242,232,0.55);
    border: 1px solid rgba(21,21,20,0.32);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    border-color: rgba(21,21,20,0.7);
    background: rgba(255,255,255,0.55);
    transform: translateY(-2px);
}

/* ===== Cards ===== */

/* Glass card — warm ivory tint with antique-gold hairline */
.card-glass {
    position: relative;
    background: linear-gradient(180deg, rgba(255,250,240,0.72) 0%, rgba(243,237,226,0.78) 100%);
    border: 1px solid rgba(154,130,56,0.22);
    border-radius: 1.25rem;
    backdrop-filter: blur(10px);
    transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
.card-glass:hover {
    border-color: rgba(154,130,56,0.45);
    transform: translateY(-4px);
    box-shadow: 0 24px 50px -28px rgba(21,21,20,0.32);
}

/* Featured card — champagne ring */
.card-featured {
    border-color: rgba(154,130,56,0.55);
    box-shadow: 0 0 0 1px rgba(154,130,56,0.15), 0 30px 60px -35px rgba(21,21,20,0.28);
}

/* ===== Eyebrow label ===== */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--champagne);
}
.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--champagne);
    opacity: 0.6;
}

/* ===== Hairline divider ===== */
.rule-gold {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(154,130,56,0.35), transparent);
}

/* ===== Form fields ===== */
.field {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255,250,240,0.65);
    border: 1px solid rgba(21,21,20,0.16);
    border-radius: 0.75rem;
    color: #171715;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.field::placeholder { color: #8a8479; }
.field:focus {
    outline: none;
    border-color: rgba(154,130,56,0.7);
    box-shadow: 0 0 0 3px rgba(154,130,56,0.14);
    background: rgba(255,255,255,0.8);
}
select.field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%239a8238' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== Animations ===== */
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.animate-floaty { animation: floaty 7s ease-in-out infinite; }

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.reveal {
    opacity: 0;
}
.reveal.is-visible {
    animation: fadeUp 0.8s cubic-bezier(0.2,0.8,0.2,1) forwards;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}
.animate-pulse-glow { animation: pulseGlow 6s ease-in-out infinite; }

/* Lotus petal slow rotation */
@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin-slow { animation: spinSlow 60s linear infinite; }

/* ===== Tier ladder horizontal scroll on mobile ===== */
.tier-scroll::-webkit-scrollbar { height: 6px; }
.tier-scroll::-webkit-scrollbar-track { background: rgba(200,168,107,0.05); border-radius: 3px; }
.tier-scroll::-webkit-scrollbar-thumb { background: rgba(200,168,107,0.3); border-radius: 3px; }

/* ===== Utility: hide scrollbar (mobile chip rows) ===== */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; }
}
