/* ============================================================
   PNX Health Solutions — Luxury Theme
   Shared by all pages (index.html keeps inline copy in sync)
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background-color: #fdfcfa;
    color: #1a1a2e;
    min-height: 100dvh;
    line-height: 1.6;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; }
p, li { text-wrap: pretty; }
button { cursor: pointer; }

/* ── CSS Variables ────────────────────────────────────────── */
:root {
    --gold: #c9a96e;
    --gold-light: #e5c47a;
    --gold-deep: #b08a4a;
    --gold-dim: rgba(201, 169, 110, 0.15);
    --midnight: #1a1a2e;
    --midnight-deep: #0d0d1a;
    --cream: #fdfcfa;
    --cream-2: #f5f1ea;

    --ease-expo: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

    --shadow-gold: 0 8px 32px rgba(201, 169, 110, 0.25);
    --shadow-dark: 0 24px 60px rgba(13, 13, 26, 0.18);
    --shadow-card: 0 2px 12px rgba(26, 26, 46, 0.06), 0 0 0 1px rgba(201, 169, 110, 0.08);
    --shadow-card-hover: 0 20px 50px rgba(26, 26, 46, 0.12), 0 0 0 1px rgba(201, 169, 110, 0.18);
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--midnight-deep); }
::-webkit-scrollbar-thumb { background: var(--gold-deep); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Selection ────────────────────────────────────────────── */
::selection { background: rgba(201, 169, 110, 0.2); color: var(--midnight); }

/* ── Focus ────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ── Typography helpers ───────────────────────────────────── */
.font-display { font-family: 'Cormorant Garamond', Georgia, serif; }

/* ── Grain overlay ────────────────────────────────────────── */
.grain::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    pointer-events: none;
    z-index: 1;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 110, 0); }
    50%       { box-shadow: 0 0 0 8px rgba(201, 169, 110, 0.08); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes resultsFade {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up    { animation: fadeUp 1s var(--ease-expo) forwards; opacity: 0; }
.animate-fade-in    { animation: fadeIn 1.2s ease forwards; opacity: 0; }
.animate-slide-left { animation: slideInLeft 1s var(--ease-expo) forwards; opacity: 0; }
.animate-scale-in   { animation: scaleIn 1s var(--ease-expo) forwards; opacity: 0; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* ── Gold shimmer text ────────────────────────────────────── */
.gold-shimmer {
    background: linear-gradient(90deg, #c9a96e, #e5c47a, #c9a96e, #b08a4a, #c9a96e);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* ── Luxury card ──────────────────────────────────────────── */
.luxury-card {
    transition: transform 0.5s var(--ease-expo), box-shadow 0.5s var(--ease-expo);
    box-shadow: var(--shadow-card);
}
.luxury-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

/* ── Divider / accent line ────────────────────────────────── */
.gold-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c9a96e, transparent);
}
.gold-line-full {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201,169,110,0.4), transparent);
}

/* ── Scroll-triggered reveal ──────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-expo), transform 0.8s var(--ease-expo);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── Video overlay ────────────────────────────────────────── */
.hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(13, 13, 26, 0.75) 0%,
        rgba(26, 26, 46, 0.82) 40%,
        rgba(26, 26, 46, 0.95) 80%,
        #1a1a2e 100%
    );
}

/* ── Borders / glow ───────────────────────────────────────── */
.border-glow {
    border: 1px solid rgba(201, 169, 110, 0.15);
    box-shadow: 0 0 0 1px rgba(201, 169, 110, 0.05);
}
.border-gold-faint { border-color: rgba(201, 169, 110, 0.2); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #c9a96e 0%, #b08a4a 100%);
    color: #1a1a2e;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.4s var(--ease-expo);
    position: relative;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary:hover {
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(201, 169, 110, 0.4);
    color: #c9a96e;
    text-decoration: none;
    transition: all 0.4s var(--ease-expo);
}
.btn-ghost:hover {
    background: rgba(201, 169, 110, 0.08);
    border-color: #c9a96e;
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.08);
}

/* ── Social icon buttons ──────────────────────────────────── */
.social-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.3);
    transition: all 0.35s var(--ease-expo);
    text-decoration: none;
    flex-shrink: 0;
}
.social-btn:hover {
    color: #c9a96e;
    border-color: rgba(201, 169, 110, 0.4);
    background: rgba(201, 169, 110, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 110, 0.15);
}
.social-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Quote card quote mark ────────────────────────────────── */
.quote-mark {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 5rem;
    line-height: 1;
    color: rgba(201, 169, 110, 0.2);
    position: absolute;
    top: -0.25rem;
    left: 1rem;
}

/* ── Scroll progress bar ──────────────────────────────────── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #c9a96e, #e5c47a);
    z-index: 200;
    transition: width 0.1s linear;
}

/* ── Stat number ──────────────────────────────────────────── */
.stat-number {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    letter-spacing: -0.02em;
}

/* ── Form inputs ──────────────────────────────────────────── */
.pnx-input {
    width: 100%;
    background: #fff;
    border: 1px solid rgba(201, 169, 110, 0.25);
    color: #1a1a2e;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
}
.pnx-input:focus {
    outline: none;
    border-color: #c9a96e;
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}
.pnx-input::placeholder { color: rgba(26, 26, 46, 0.3); }

select.pnx-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23c9a96e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* ── Quote page specific ──────────────────────────────────── */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(201, 169, 110, 0.2);
    border-top-color: #c9a96e;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.results-fade-in { animation: resultsFade 0.6s var(--ease-expo); }

.bar-fill {
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a96e, #b08a4a);
    color: #1a1a2e;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Decorative elements ──────────────────────────────────── */
.corner-accent::before,
.corner-accent::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(201, 169, 110, 0.3);
    border-style: solid;
}
.corner-accent::before {
    top: 12px; left: 12px;
    border-width: 1px 0 0 1px;
}
.corner-accent::after {
    bottom: 12px; right: 12px;
    border-width: 0 1px 1px 0;
}

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