/* =========================================================================
   Sihini.live — Shared Design System ("Refined Luxury")
   Single source of truth for tokens, typography, and components.
   Layered on top of Bootstrap 5.3. Loaded once in layouts/app.blade.php.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------------------- */
:root {
    /* Surfaces & ink */
    --bg:          #ffffff;   /* page background            */
    --surface:     #ffffff;   /* cards / elevated surfaces  */
    --surface-2:   #f7f6f4;   /* inputs, inset panels       */
    --ink:         #1d1d1f;   /* primary text               */
    --ink-soft:    #3a3a3d;   /* slightly softened heading  */
    --muted:       #6e6e73;   /* secondary text             */
    --line:        rgba(0,0,0,.08);   /* borders / dividers */
    --line-strong: rgba(0,0,0,.14);

    /* Brand gold */
    --gold:        #c8a04a;   /* canonical accent           */
    --gold-bright: #d8b65f;   /* hover / highlight          */
    --gold-deep:   #a9822f;   /* text-on-light gold, ribbons*/
    --gold-tint:   rgba(200,160,74,.10);
    --gold-ring:   rgba(200,160,74,.22);

    /* Type */
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body:    'Montserrat', 'Noto Sans Sinhala', system-ui, sans-serif;
    --font-sinhala: 'Noto Sans Sinhala', 'Montserrat', sans-serif;

    /* Radius */
    --radius-sm: 10px;
    --radius:    16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    /* Elevation — soft, restrained */
    --shadow-sm: 0 1px 2px rgba(20,19,17,.05);
    --shadow:    0 6px 24px rgba(20,19,17,.07);
    --shadow-lg: 0 18px 48px rgba(20,19,17,.10);
    --shadow-gold: 0 12px 34px var(--gold-ring);

    /* Motion */
    --ease: cubic-bezier(.22,.61,.36,1);
    --transition: all .3s var(--ease);

    /* Layout */
    --header-height: 78px;
    --container-max: 1200px;

    /* -------- Legacy aliases (kept so un-migrated per-page <style> blocks
       keep working during migration; removed in the cleanup phase) -------- */
    --studio-black:   var(--bg);
    --studio-surface: var(--surface);
    --studio-surface-2: var(--surface-2);
    --studio-gold:    var(--gold);
    --gold-light:     var(--gold-bright);
    --cream:          var(--ink);
    --primary-bg:     var(--bg);
    --secondary-bg:   var(--surface);
    --text-color:     var(--ink);
    --light-text:     var(--muted);
    --border-color:   var(--line);
    --gold-shadow:    var(--gold-ring);
    --border-radius:  var(--radius);
}

/* -------------------------------------------------------------------------
   2. Base typography
   ------------------------------------------------------------------------- */
body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--bg);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.01em;
    color: var(--ink);
}
h5, h6 {
    font-family: var(--font-body);
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink);
}

/* Fluid display scale */
.display-1, .display-2, .display-3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.015em; }
h1, .h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
h2, .h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3, .h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }

.lead { font-size: 1.15rem; color: var(--muted); font-weight: 400; }

a { color: inherit; text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--gold-deep); }

.sinhala-text { font-family: var(--font-sinhala); font-weight: 600; }

/* Remap Bootstrap text utilities to the palette */
.text-muted     { color: var(--muted) !important; }
.text-dark      { color: var(--ink) !important; }
.text-secondary { color: var(--muted) !important; }
.text-gold      { color: var(--gold-deep) !important; }
.serif          { font-family: var(--font-display); }

/* -------------------------------------------------------------------------
   3. Layout helpers
   ------------------------------------------------------------------------- */
.section        { padding: clamp(56px, 9vw, 112px) 0; }
.section-tight  { padding: clamp(40px, 6vw, 72px) 0; }
.section-alt    { background-color: var(--surface-2); }
.section-line   { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.eyebrow {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: .9rem;
}

.title-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--muted);
    box-shadow: var(--shadow-sm);
}

.section-header { max-width: 640px; margin: 0 auto clamp(2rem, 4vw, 3.2rem); }

/* -------------------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------------------- */
.btn-primary,
.btn-glow,
.btn-gold,
.btn-elegant {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background-color: var(--gold);
    border: 1px solid var(--gold);
    color: #1a1508;
    font-weight: 600;
    letter-spacing: .01em;
    padding: .8rem 1.7rem;
    border-radius: var(--radius-pill);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    text-decoration: none;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-glow:hover, .btn-gold:hover, .btn-elegant:hover {
    background-color: var(--gold-bright) !important;
    border-color: var(--gold-bright);
    color: #1a1508 !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-outline,
.btn-outline-cute,
.btn-outline-light,
.btn-outline-music {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--ink);
    font-weight: 600;
    padding: .8rem 1.7rem;
    border-radius: var(--radius-pill);
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}
.btn-outline:hover,
.btn-outline-cute:hover,
.btn-outline-light:hover,
.btn-outline-music:hover {
    border-color: var(--gold);
    color: var(--gold-deep);
    background: var(--gold-tint);
    transform: translateY(-2px);
}

/* Quiet / ghost — for demoted (membership) actions */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: transparent;
    border: none;
    color: var(--muted);
    font-weight: 600;
    padding: .5rem .25rem;
    transition: var(--transition);
    cursor: pointer;
}
.btn-ghost:hover { color: var(--gold-deep); }

.btn-lg-cta { padding: .95rem 2.1rem; font-size: 1.02rem; }

/* -------------------------------------------------------------------------
   5. Cards & surfaces
   ------------------------------------------------------------------------- */
.card,
.surface-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}
.surface-card { padding: clamp(1.5rem, 3vw, 2.4rem); }

.hover-lift { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.hover-lift:hover,
.card.is-interactive:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--line-strong);
}

img.img-fluid:not(.card-img-top) { border-radius: var(--radius); }

/* -------------------------------------------------------------------------
   6. Forms
   ------------------------------------------------------------------------- */
.form-control,
.form-select,
.studio-input,
textarea.form-control {
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: .8rem 1rem;
    color: var(--ink);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
    width: 100%;
}
.form-control::placeholder, .studio-input::placeholder { color: #a6a6ab; }
.form-control:focus,
.form-select:focus,
.studio-input:focus {
    border-color: var(--gold);
    background: var(--surface);
    outline: none;
    box-shadow: 0 0 0 3px var(--gold-ring);
}

/* -------------------------------------------------------------------------
   7. Scroll-reveal (shared IntersectionObserver hooks)
   ------------------------------------------------------------------------- */
.reveal        { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-left   { opacity: 0; transform: translateX(-18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-right  { opacity: 0; transform: translateX(18px);  transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.visible,        .reveal.is-visible,
.reveal-left.visible,   .reveal-left.is-visible,
.reveal-right.visible,  .reveal-right.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-left, .reveal-right { opacity: 1 !important; transform: none !important; }
}

/* -------------------------------------------------------------------------
   8. Live / online indicator (single definition)
   ------------------------------------------------------------------------- */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--muted);
}
.live-dot, .online-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 0 0 rgba(34,197,94,.5);
    animation: sihini-pulse 1.8s infinite ease-in-out;
    display: inline-block;
}
@keyframes sihini-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
    50%     { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

/* -------------------------------------------------------------------------
   9. Pagination (moved from app.blade.php, cleaned)
   ------------------------------------------------------------------------- */
.pagination .page-link {
    color: var(--ink);
    background-color: var(--surface);
    border: 1px solid var(--line);
    font-weight: 500;
    transition: var(--transition);
}
.pagination .page-link:hover {
    color: var(--gold-deep);
    border-color: var(--gold);
    background-color: var(--surface-2);
}
.pagination .page-item.active .page-link {
    font-weight: 700;
    color: #1a1508;
    background-color: var(--gold);
    border-color: var(--gold);
}
.pagination .page-item.disabled .page-link {
    color: var(--muted);
    background-color: var(--surface-2);
    border-color: var(--line);
    opacity: .6;
}

/* -------------------------------------------------------------------------
   10. Media cards (video / wallpaper / gallery) — moved & cleaned
   ------------------------------------------------------------------------- */
.video-card, .wallpaper-link { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.video-card-link:hover .video-card,
.wallpaper-link:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.video-card img, .wallpaper-link img, .transition-transform { transition: transform .5s var(--ease); }
.video-card-link:hover .transition-transform,
.wallpaper-link:hover img { transform: scale(1.03); }

.overlay, .play-overlay {
    background: rgba(20,19,17,.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .3s var(--ease);
}
.wallpaper-link:hover .overlay,
.video-card-link:hover .play-overlay { opacity: 1; }
.transform-scale, .play-icon-btn { transform: scale(.96); transition: transform .3s var(--ease); }
.wallpaper-link:hover .transform-scale,
.video-card-link:hover .play-icon-btn { transform: scale(1); }
.arrow-anim { transition: transform .3s var(--ease); }
.video-card-link:hover .arrow-anim { transform: translateX(5px); color: var(--gold-deep) !important; }

.text-truncate-2-lines {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Swiper (gold theme) */
.swiper-pagination-bullet { background: var(--muted); opacity: .5; }
.swiper-pagination-bullet-active { background: var(--gold); opacity: 1; }
.swiper-button-custom {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 50%; z-index: 10; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm); color: var(--ink); transition: var(--transition);
}
.swiper-button-custom:hover { color: var(--gold-deep); border-color: var(--gold); }
.swiper-button-prev { left: 0; } .swiper-button-next { right: 0; }
.swiper-button-disabled { opacity: 0; pointer-events: none; }

/* -------------------------------------------------------------------------
   11. Alpine dropdown utility classes (moved from app.blade.php)
   ------------------------------------------------------------------------- */
[x-cloak] { display: none !important; }
.transition { transition-property: background-color,border-color,color,fill,stroke,opacity,box-shadow,transform; }
.duration-200 { transition-duration: 200ms; } .duration-150 { transition-duration: 150ms; }
.ease-out { transition-timing-function: cubic-bezier(0,0,.2,1); }
.ease-in  { transition-timing-function: cubic-bezier(.4,0,1,1); }
.opacity-0 { opacity: 0; } .opacity-100 { opacity: 1; }
.scale-95 { transform: scale(.95); } .scale-100 { transform: scale(1); }
.rotate-180 { transform: rotate(180deg); }
.tracking-widest { letter-spacing: .15em; }

/* -------------------------------------------------------------------------
   12. Utility
   ------------------------------------------------------------------------- */
.backdrop-blur { background: rgba(255,255,255,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* -------------------------------------------------------------------------
   13. Site header / navigation
   ------------------------------------------------------------------------- */
.site-header {
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
.site-header .brand img { width: 116px; height: auto; }
.navbar-toggler { box-shadow: none !important; }
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(29,29,31,.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link-custom {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--muted) !important;
    padding: .5rem .9rem !important;
    position: relative;
    font-size: .95rem;
    letter-spacing: .01em;
    transition: color .25s var(--ease);
}
.nav-link-custom::after {
    content: '';
    position: absolute;
    left: 50%; bottom: 2px;
    width: 0; height: 2px;
    background-color: var(--gold);
    transform: translateX(-50%);
    transition: width .25s var(--ease);
}
.nav-link-custom:hover,
.nav-link-custom.active { color: var(--ink) !important; }
.nav-link-custom:hover::after,
.nav-link-custom.active::after { width: 22px; }

/* Header auth dropdown */
.dropdown-menu-custom {
    position: absolute;
    right: 0; top: 100%;
    margin-top: 12px;
    width: 220px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    z-index: 1050;
    overflow: hidden;
    transform-origin: top right;
}
.dropdown-item-custom {
    display: flex; align-items: center; gap: .65rem;
    width: 100%;
    padding: .7rem 1.1rem;
    color: var(--ink);
    font-size: .92rem;
    font-weight: 500;
    background: none; border: none; text-align: left;
    transition: background .2s var(--ease), color .2s var(--ease), padding .2s var(--ease);
}
.dropdown-item-custom:hover { background: var(--surface-2); color: var(--gold-deep); padding-left: 1.35rem; }
.dropdown-item-custom.text-danger:hover { background: rgba(220,53,69,.1); color: #d64550; }
.user-avatar-circle {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    color: #1a1508;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 1rem;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(255,255,255,.98);
        backdrop-filter: blur(12px);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        margin-top: 12px;
        padding: 1.25rem 1rem;
    }
    .navbar-nav .nav-link-custom {
        padding: .8rem .25rem !important;
        font-size: 1.02rem;
        border-bottom: 1px solid var(--line);
    }
    .navbar-nav .nav-link-custom::after { display: none; }
    .dropdown-menu-custom { position: relative; width: 100%; margin-top: 8px; box-shadow: none; }
}

/* -------------------------------------------------------------------------
   14. Footer
   ------------------------------------------------------------------------- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 3rem 0;
    color: var(--muted);
    font-size: .92rem;
}
.site-footer .social-links a {
    color: var(--muted);
    font-size: 1.35rem;
    margin: 0 .55rem;
    transition: color .25s var(--ease), transform .25s var(--ease);
    display: inline-block;
}
.site-footer .social-links a:hover { color: var(--gold-deep); transform: translateY(-3px); }
