/**
 * CanyonClicks Design System Tokens & Components
 * Inspired by GemPixel Architecture (https://gempixel.com/)
 * Warm stone palette, architectural vertical grid borders, Inter typography,
 * pill buttons, asymmetric bento cards, and micro-animations.
 */

:root {
    /* Stone Palette */
    --gp-stone-50: #fafaf9;
    --gp-stone-100: #f5f5f4;
    --gp-stone-200: #e7e5e4;
    --gp-stone-300: #d6d3d1;
    --gp-stone-400: #a8a29e;
    --gp-stone-500: #78716c;
    --gp-stone-600: #57534e;
    --gp-stone-700: #44403c;
    --gp-stone-800: #292524;
    --gp-stone-900: #1c1917;
    --gp-stone-950: #0c0a09;

    /* Accent & Brand Colors */
    --gp-orange-50: #fff7ed;
    --gp-orange-100: #ffedd5;
    --gp-orange-200: #fed7aa;
    --gp-orange-500: #f97316;
    --gp-orange-600: #ea580c;
    --gp-orange-700: #c2410c;
    --gp-orange-light: #fff7ed;

    --gp-primary: #ea580c;
    --gp-primary-hover: #c2410c;
    --gp-border: #e7e5e4;
    --gp-border-hover: #d6d3d1;

    /* Backgrounds & Surfaces */
    --gp-bg: #f5f5f4;
    --gp-surface: #ffffff;
    --gp-surface-muted: #fafaf9;

    /* Text */
    --gp-text: #1c1917;
    --gp-text-muted: #57534e;
    --gp-text-subtle: #78716c;
    --gp-text-inverse: #ffffff;

    /* Typography */
    --gp-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Border Radius */
    --gp-radius-sm: 6px;
    --gp-radius-md: 10px;
    --gp-radius-lg: 14px;
    --gp-radius-xl: 18px;
    --gp-radius-2xl: 24px;
    --gp-radius-pill: 9999px;

    /* Shadows */
    --gp-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --gp-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --gp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --gp-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    --gp-shadow-xl: 0 20px 35px -10px rgba(0, 0, 0, 0.12);
}

/* Base Body Styles */
body.gp-theme,
body.canyon-theme {
    font-family: var(--gp-font);
    background-color: var(--gp-bg);
    color: var(--gp-text);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Architectural Outer Frame with Vertical Grid Lines */
.gp-frame,
.canyon-frame {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    border-left: 1px solid var(--gp-border);
    border-right: 1px solid var(--gp-border);
    background-color: var(--gp-bg);
    position: relative;
}

/* Primary Pill Buttons */
.btn-primary,
.gp-btn-primary,
.canyon-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #000000;
    color: #ffffff !important;
    border-radius: var(--gp-radius-pill);
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid #000000;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-primary:hover,
.gp-btn-primary:hover,
.canyon-btn-primary:hover {
    background: #292524;
    border-color: #292524;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* Ghost Pill Buttons */
.btn-ghost,
.gp-btn-ghost,
.canyon-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: var(--gp-text) !important;
    border-radius: var(--gp-radius-pill);
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid var(--gp-border);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.btn-ghost:hover,
.gp-btn-ghost:hover,
.canyon-btn-ghost:hover {
    background: #ffffff;
    border-color: var(--gp-stone-300);
    transform: translateY(-1px);
}

/* Secondary Pill */
.gp-btn-secondary,
.canyon-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    color: var(--gp-text) !important;
    border-radius: var(--gp-radius-pill);
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--gp-border);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.gp-btn-secondary:hover,
.canyon-btn-secondary:hover {
    background: var(--gp-stone-50);
    border-color: var(--gp-stone-300);
}

/* Magnetic Button Animation */
.magnetic-btn {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.magnetic-btn-inner {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.magnetic-btn:hover {
    transform: scale(1.02);
}

/* ========================================================
   GEMPIXEL HERO PRODUCT PICKER WITH PROGRESS UNDERLAY
   ======================================================== */
.hero-product-picker {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
}

.hero-product-word {
    display: inline-block;
    vertical-align: baseline;
    cursor: pointer;
    background: transparent;
    padding: 0;
    border: none;
    font-weight: 800;
    line-height: 1.1;
    text-align: left;
    outline: none;
}

.hero-product-word-fill {
    position: relative;
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 2px 18px;
    background: #0c0a09;
    color: #ffffff;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.hero-product-underlay {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.hero-product-underlay-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: #ea580c;
    border-radius: 9999px;
    z-index: 2;
    transition: width 4.5s linear;
}

.hero-product-underlay-fill.is-animating {
    width: 100%;
}

.hero-product-label-text {
    position: relative;
    z-index: 3;
    font-weight: 800;
    white-space: nowrap;
    user-select: none;
    transition: opacity 0.25s ease;
}

.hero-product-menu {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 50;
    margin-top: 10px;
    min-width: 15rem;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid var(--gp-border);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(16px);
    transition: all 0.2s ease;
}

.hero-product-option {
    display: block;
    width: 100%;
    padding: 12px 18px;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: var(--gp-stone-700);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hero-product-option:hover,
.hero-product-option.is-active {
    background: var(--gp-orange-light);
    color: var(--gp-orange-600);
}

/* ========================================================
   BENTO GRID & WORD CLOUD ELEMENTS
   ======================================================== */
.gp-bento-card,
.canyon-bento-card {
    background: #ffffff;
    border: 1px solid var(--gp-border);
    border-radius: 1.25rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.gp-bento-card:hover,
.canyon-bento-card:hover {
    border-color: var(--gp-stone-300);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Draggable Word Tag Pills (GemPixel style) */
.word-tag {
    position: absolute;
    color: #1c1917;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: grab;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    user-select: none;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.word-tag:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.15);
    background: #ffffff;
    color: var(--gp-orange-600);
    z-index: 10;
}

.word-tag:active {
    cursor: grabbing;
    background: var(--gp-orange-600) !important;
    color: #ffffff !important;
    transform: scale(0.98);
}

/* Dark Obsidian Contrast Section */
.gp-obsidian,
.canyon-obsidian {
    background: var(--gp-stone-950);
    color: #ffffff;
    border-radius: 1.5rem;
}

/* Badges & Trust Pills */
.gp-badge-pill,
.canyon-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--gp-radius-pill);
    font-size: 13px;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid var(--gp-border);
    color: var(--gp-text);
}

.gp-badge-orange,
.canyon-badge-orange {
    background: var(--gp-orange-light);
    color: var(--gp-orange-600);
    border: 1px solid rgba(234, 88, 12, 0.2);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--gp-radius-pill);
}

/* ========================================================
   INFINITE MARQUEE SCROLL
   ======================================================== */
@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.animate-scroll {
    display: flex;
    width: max-content;
    animation: scrollLeft 35s linear infinite;
}

.animate-scroll-reverse {
    display: flex;
    width: max-content;
    animation: scrollRight 35s linear infinite;
}

.animate-scroll:hover,
.animate-scroll-reverse:hover {
    animation-play-state: paused;
}

/* Typing Cursor Simulation */
.typed-cursor {
    opacity: 1;
    animation: typedBlink 0.8s infinite;
}

@keyframes typedBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ========================================================
   GEMPIXEL STICKY NAVBAR & DOCK ANIMATIONS
   ======================================================== */
#navbar {
    transition: padding 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-inner {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Top of page state */
#navbar:not(.nav-scrolled) {
    padding-top: 1.25rem;
}

/* ========================================================
   GEMPIXEL HEADER & FLOATING STICKY DOCK ANIMATION
   ======================================================== */
#navbar {
    padding-top: 1.25rem !important;
    transition: padding 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#navbar .nav-container {
    transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#navbar .nav-backdrop {
    position: absolute;
    inset: 0 0.5rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(229, 231, 235, 0.85);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    border-radius: 9999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease !important;
}

#navbar .nav-content {
    height: 5rem;
    transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Sticky dock state on scroll (GemPixel signature effect) */
#navbar.scrolled,
#navbar.nav-scrolled {
    padding-top: 0.5rem !important;
}

#navbar.scrolled .nav-backdrop,
#navbar.nav-scrolled .nav-backdrop {
    opacity: 1 !important;
    pointer-events: auto !important;
}

#navbar.scrolled .nav-content,
#navbar.nav-scrolled .nav-content {
    height: 3.5rem !important;
    padding-left: 1.25rem !important;
    padding-right: 0.85rem !important;
}

#navbar.scrolled .nav-logo,
#navbar.nav-scrolled .nav-logo {
    transform: scale(0.97);
    transition: transform 0.3s ease;
}

#navbar.scrolled .nav-cta-btn,
#navbar.nav-scrolled .nav-cta-btn {
    padding: 0.5rem 1.15rem !important;
    font-size: 0.8125rem !important;
    transition: all 0.25s ease;
}

