/* ═══════════════════════════════════════════════
   GoSIM — eSIM Store for Travelers
   ═══════════════════════════════════════════════ */

/* --- Typography --- */
:root {
    font-family: 'DM Sans', system-ui, sans-serif;
}

.font-display {
    font-family: 'Instrument Serif', 'Georgia', serif;
}

/* --- Selection (uses theme color) --- */
::selection {
    background: var(--color-primary);
    color: var(--color-primary-content);
}

/* --- Light theme --- */
[data-theme="light"] {
    --color-primary: oklch(0.50 0.14 180);
    --color-primary-content: oklch(0.98 0 0);
    --color-secondary: oklch(0.68 0.14 65);
    --color-secondary-content: oklch(0.18 0.02 65);
    --color-accent: oklch(0.50 0.14 180);
    --color-neutral: oklch(0.20 0.02 260);
    --color-neutral-content: oklch(0.95 0 0);
    --color-base-100: oklch(0.985 0.003 90);
    --color-base-200: oklch(0.96 0.006 90);
    --color-base-300: oklch(0.93 0.006 90);
    --color-base-content: oklch(0.22 0.03 260);
    --color-info: oklch(0.50 0.14 180);
    --color-info-content: oklch(0.98 0 0);
}

/* --- Dark theme --- */
[data-theme="dark"] {
    --color-primary: oklch(0.62 0.14 180);
    --color-primary-content: oklch(0.12 0.02 180);
    --color-secondary: oklch(0.72 0.14 65);
    --color-secondary-content: oklch(0.15 0.02 65);
    --color-accent: oklch(0.62 0.14 180);
    --color-neutral: oklch(0.85 0.01 260);
    --color-neutral-content: oklch(0.18 0.02 260);
    --color-base-100: oklch(0.18 0.02 250);
    --color-base-200: oklch(0.15 0.02 250);
    --color-base-300: oklch(0.12 0.02 250);
    --color-base-content: oklch(0.92 0.005 90);
    --color-info: oklch(0.62 0.14 180);
    --color-info-content: oklch(0.98 0 0);
}

/* --- Hero gradient mesh (CTA section background) --- */
.hero-mesh {
    background:
        radial-gradient(ellipse 80% 60% at 20% 80%, color-mix(in oklch, var(--color-primary) 15%, transparent), transparent),
        radial-gradient(ellipse 60% 80% at 80% 20%, color-mix(in oklch, var(--color-secondary) 10%, transparent), transparent);
}

/* --- Dot grid overlay --- */
.dot-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, currentColor 0.5px, transparent 0);
    background-size: 32px 32px;
    opacity: 0.035;
    pointer-events: none;
}

/* --- Hero floating badges --- */
.hero-badge {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-badge-sm {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    opacity: 0.5;
}

/* --- Destination card image treatment --- */
.dest-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    aspect-ratio: 3 / 4;
}

.dest-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.dest-card:hover img {
    transform: scale(1.08);
}

.dest-card .dest-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 15, 30, 0.85) 0%, rgba(15, 15, 30, 0.2) 50%, transparent 100%);
    transition: background 0.4s ease;
}

.dest-card:hover .dest-overlay {
    background: linear-gradient(to top, rgba(15, 15, 30, 0.90) 0%, rgba(15, 15, 30, 0.35) 50%, rgba(15, 15, 30, 0.1) 100%);
}

.dest-card .dest-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: white;
    transform: translateY(4px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.dest-card:hover .dest-info {
    transform: translateY(0);
}


/* --- Search glow (uses theme color) --- */
.search-glow {
    transition: box-shadow 0.3s ease;
}

.search-glow:focus-within {
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 25%, transparent),
                0 8px 32px color-mix(in oklch, var(--color-primary) 10%, transparent);
}

/* --- Promo bar slide --- */
#promo-bar {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

#promo-bar.dismissed {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* --- Navbar glass --- */
.nav-glass {
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid rgba(128, 128, 128, 0.06);
}

/* --- Value prop icon circle (uses theme color) --- */
.icon-circle {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: color-mix(in oklch, var(--color-primary) 8%, transparent);
    border: 1.5px solid color-mix(in oklch, var(--color-primary) 15%, transparent);
    transition: transform 0.3s ease, background 0.3s ease;
}

.icon-circle:hover {
    transform: scale(1.1);
    background: color-mix(in oklch, var(--color-primary) 15%, transparent);
}

/* --- CTA shimmer --- */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { left: -100%; }
    50% { left: 150%; }
}

/* --- Floating badge animation --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.float-slow {
    animation: float 6s ease-in-out infinite;
}

.float-medium {
    animation: float 4s ease-in-out infinite;
    animation-delay: -1s;
}

/* --- Grain overlay --- */
.grain-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    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)'/%3E%3C/svg%3E");
    pointer-events: none;
}
