/* 
   PenPeeper Website Styles 
   Theme: Dark Neumorphism - Darkened tones, Blues and Greys, Premium Feel
*/

:root {
    /* Color Palette */
    --bg-dark: #1e293b;
    /* Base color for neumorphic elements (matches cards) */
    --bg-body: #0f172a;
    /* Darker background for the void/video overlay */

    --bg-header: #1e293b;

    /* Glassmorphism Variables */
    --bg-glass: rgba(30, 41, 59, 0.4);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --glass-filter: blur(12px);

    --text-primary: #e2e8f0;
    /* Brighter White/Grey */
    --text-secondary: #94a3b8;
    /* Muted Grey Blue */

    --accent-primary: #38bdf8;
    /* Light Blue / Cyan */
    --accent-hover: #0ea5e9;
    /* Darker Blue for hover */

    --border-color: #334155;

    /* Neumorphic Shadows (Dark Theme) */
    --shadow-light: rgba(255, 255, 255, 0.05);
    /* Very subtle light source */
    --shadow-dark: rgba(0, 0, 0, 0.6);
    /* Deep shadow */
    --shadow-neumorphic: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
    --shadow-neumorphic-pressed: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    --shadow-neumorphic-sm: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);

    /* Spacing & Sizes */
    --container-width: 1200px;
    --header-height: 80px;
    /* Slightly taller for the pill header look */
    --border-radius: 20px;
    /* More rounded for soft UI */
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.text-accent {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
    /* Glowing text */
}

/* Buttons (Neumorphic) */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    /* No border for pure neumorphism usually, or very thin */
    background-color: var(--bg-dark);
    color: var(--text-primary);
    box-shadow: var(--shadow-neumorphic);
}

.btn:active {
    box-shadow: var(--shadow-neumorphic-pressed);
    transform: translateY(2px);
}

.btn-primary {
    /* For primary action, we might want a slight tint or just the accent color text/icon, 
       but "True" neumorphism often keeps the button body the same color as bg. 
       Let's try a subtle gradient for primary to make it pop but keep the shape. */
    background: linear-gradient(145deg, #1e293b, #151e2e);
    color: var(--accent-primary);
}

.btn-primary:hover {
    color: var(--accent-hover);
    /* Make shadow stronger on hover */
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
}

.btn-outline {
    /* In neumorphism, outlining is essentially the same but maybe 'pressed' or just flat. 
       Let's make it a standard raised button for consistency but less emphasized. */
    background: var(--bg-dark);
    color: var(--text-secondary);
}

.btn-outline:hover {
    color: var(--text-primary);
}

/* Image Styling */
.img-styled {
    border-radius: var(--border-radius);
    padding: 10px;
    background-color: var(--bg-glass);
    backdrop-filter: var(--glass-filter);
    border: var(--glass-border);
    box-shadow: var(--shadow-neumorphic);
}

/* Layout Sections */
section {
    padding: 80px 0;
}

/* Header / Navbar (Floating Neumorphic Capsule) */
header {
    background-color: var(--bg-glass);
    backdrop-filter: var(--glass-filter);
    -webkit-backdrop-filter: var(--glass-filter);
    height: 100px;
    /* Taller to encompass the pill */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    justify-content: center;
    /* Ensure nav stays centered */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    justify-content: center;
    /* Removed overflow: hidden so mobile menu can dropdown visible */
}

/* Decorative side bars */
header::before,
header::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 250px;
    height: 70px;
    /* Slightly smaller than nav pill 80px */
    background-color: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 50px;
    box-shadow: var(--shadow-neumorphic);
    z-index: 1;
    /* Below nav-container which should be higher, check z-index of nav-container */
}

header::before {
    left: -125px;
    /* Half off-screen to create the curve in */
}

header::after {
    right: -125px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);

    /* The Glass Pill */
    background-color: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--glass-border);

    border-radius: 50px;
    padding: 0 40px;
    pointer-events: auto;
    box-shadow: var(--shadow-neumorphic);

    /* Fixed: Use margins to guarantee gap from side curves */
    margin: 0 150px;
    width: auto !important;
    /* Override 95% width if present anywhere else, changing logic */
    max-width: var(--container-width);
    z-index: 10;
    transition: margin 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    margin-right: 60px;
    /* Added significant spacing from nav links */
}

.logo img {
    height: 36px;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.3));
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-primary);
    background-color: var(--bg-dark);
    box-shadow: var(--shadow-neumorphic-pressed);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 10px;
    border-radius: 50%;
    box-shadow: var(--shadow-neumorphic-sm);
    background-color: var(--bg-dark);
}

.menu-toggle:active {
    box-shadow: var(--shadow-neumorphic-pressed);
}

/* Hero Section */
.hero {
    padding-top: 180px;
    padding-bottom: 80px;
    text-align: center;
    background: transparent;
}

/* ... (omitting unchanged hero styles) ... */

/* Responsive */
@media (max-width: 1460px) {
    /* Ensure the gap holds as we approach the danger zone before 1024px */
    /* Actually the margin: 0 150px handles this naturally, 
        but we can tune if needed. 
        If user said it overlaps at 1460px, it was likely due to width:95%.
        With margin 150px, it should be safe. */
}

@media (max-width: 1024px) {

    /* Shrink curves slightly on intermediate screens */
    header::before,
    header::after {
        width: 200px;
    }

    header::before {
        left: -120px;
    }

    /* Visible 80px */
    header::after {
        right: -120px;
    }

    .nav-container {
        margin: 0 100px;
        /* 80px visible + 20px gap */
        padding: 0 20px;
    }
}

/* Change Tablet/Mobile Breakpoint to 900px (covers 895px request) */
@media (max-width: 900px) {
    header {
        top: 0;
        /* Reset header height if needed, or keep 100px */
        height: 80px;
        /* Standard height */
        background-color: var(--bg-dark);
        /* Solid background as requested */
        backdrop-filter: none;
        /* Remove glass effect for solid look */
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Hide curves on mobile/tablet */
    header::before,
    header::after {
        display: none;
    }

    .nav-container {
        margin: 0;
        width: 100% !important;
        max-width: none;
        border-radius: 0;
        /* Full width bar */
        background-color: transparent;
        /* Header handles bg now */
        box-shadow: none;
        /* Flat look or use header shadow */
        border: none;
        padding: 0 20px;
    }

    /* Hide Desktop Links / Show Hamburger */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        /* Match header height */
        left: 0;
        /* Full width drop */
        width: 100%;
        background-color: var(--bg-dark);
        padding: 20px;
        border-radius: 0 0 20px 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        z-index: 20;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
        border-radius: 12px;
        /* Rounded Edge Square */
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Cleanup old 768px block since it's merged into 900px */
@media (max-width: 768px) {
    /* Only keep things that are specific to VERY small screens if any.
       Most logic moved to 900px. */

    .themes-grid {
        grid-template-columns: 1fr;
    }

    .prev,
    .next {
        width: 40px;
        height: 40px;
        margin-top: -20px;
    }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    line-height: 1.2;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-primary);
    /* Brighter for legibility over video */
    max-width: 700px;
    margin: 0 auto 50px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
}

/* Carousel Section */
.carousel-section {
    background-color: transparent;
    /* Let video through? Or semi-transparent panel? */
    position: relative;
    padding-top: 40px;
}

/* If we want the carousel to sit on a neumorphic "plate" */
.carousel-container {
    position: relative;
    max-width: 1200px;
    /* Increased by 20% from 1000px */
    margin: 0 auto;
    padding: 20px;
    /* Optional: Put the whole carousel in a frame? 
       For now, leaving images as the "cards" handled by .img-styled */
}

.carousel-slide {
    display: none;
    animation: fadeEffect 1s;
    text-align: center;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    margin: 0 auto;
    width: 100%;
    /* Removed max-height and object-fit to prevent cropping */
    height: auto;
    /* Styles are applied by .img-styled class on the img tag itself */
}

/* Carousel Buttons (Neumorphic Circles) */
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -25px;
    color: var(--text-primary);
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s ease;
    border-radius: 50%;
    /* Circle */
    user-select: none;
    background-color: var(--bg-dark);
    box-shadow: var(--shadow-neumorphic-sm);
    /* Remove default rgba bg */
}

.next {
    right: -20px;
    /* Pull them out a bit or stick to edge */
}

.prev {
    left: -20px;
}

.prev:hover,
.next:hover {
    color: var(--accent-primary);
    transform: scale(1.1);
}

.prev:active,
.next:active {
    box-shadow: var(--shadow-neumorphic-pressed);
    transform: scale(0.95);
}

/* Carousel Indicators (Dots) */
.carousel-indicators {
    text-align: center;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.dot {
    cursor: pointer;
    height: 16px;
    width: 16px;
    background-color: var(--bg-dark);
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-neumorphic-pressed);
    /* Default to 'pressed' hole look or popped? usually popped is better for clickable */
    /* Let's try popped first */
    box-shadow: var(--shadow-neumorphic-sm);
}

.dot:hover {
    transform: scale(1.2);
}

.dot.active {
    background-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
    /* Glow active */
}

/* Video Section */
.video-section {
    padding: 60px 0;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-neumorphic);
    background-color: var(--bg-dark);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.feature-card {
    background-color: var(--bg-glass);
    /* Frosted */
    backdrop-filter: var(--glass-filter);
    -webkit-backdrop-filter: var(--glass-filter);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-neumorphic);
    border: var(--glass-border);
}

.feature-card:hover {
    transform: translateY(-5px);
    /* Stronger shadow on hover? */
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Footer */
footer {
    background-color: var(--bg-dark);
    /* Should match the neumorphic base */
    padding: 60px 0 20px;
    border-top: none;
    /* Shadow instead? */
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.2);
    /* Lift footer slightly */
    position: relative;
    z-index: 10;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-secondary);
}

.footer-col ul li a:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 5px rgba(56, 189, 248, 0.4);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animation */
@keyframes fadeEffect {
    from {
        opacity: .4
    }

    to {
        opacity: 1
    }
}

/* Themes Grid Update */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    /* Adjusted width */
    gap: 60px;
    padding-bottom: 60px;
}

/* Global Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.95);
    /* Darker backdrop */
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    display: block;
    margin: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.3s;
    border: 5px solid var(--bg-dark);
    /* Frame it */
}

.image-modal .close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
    /* Make close button neumorphic too? */
    background: var(--bg-dark);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-neumorphic);
}

.image-modal .close:hover,
.image-modal .close:focus {
    color: var(--accent-primary);
    box-shadow: var(--shadow-neumorphic-pressed);
}

/* Cursor for clickable images */
.img-styled,
.theme-card img,
.feature-item img,
.step-image {
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.img-styled:hover,
.theme-card img:hover,
.feature-item img:hover,
.step-image:hover {
    transform: scale(1.02);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

@keyframes fadeIn {
    from {
        background-color: rgba(0, 0, 0, 0)
    }

    to {
        background-color: rgba(15, 23, 42, 0.95)
    }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
/* (Consolidated media queries above) */

/* Video Background */
.video-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.video-bg-container video {
    object-fit: cover;
    width: 100%;
    height: 100%;
    opacity: 0.6;
    /* Increased brightness for contrast with dark elements */
}

/* Gradient Overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Lighter gradient to allow neumorphic shapes to stand out against the deep backdrop */
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.9) 100%);
    pointer-events: none;
}

/* 
   ----------------------------------------
   Migrated Page-Specific Styles (Features & Quick Start)
   Updated for Glassmorphism
   ----------------------------------------
*/

/* Features Page */
.feature-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
    padding-bottom: 60px;
}

.feature-item {
    /* Glassmorphism applied here instead of var(--bg-card) */
    background-color: var(--bg-glass);
    backdrop-filter: var(--glass-filter);
    -webkit-backdrop-filter: var(--glass-filter);
    border: var(--glass-border);

    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-neumorphic);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-text {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.feature-text h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    margin-top: 0;
}

.feature-text p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Quick Start Page */
.step-container {
    max-width: 800px;
    margin: 0 auto;
}

.step-card {
    /* Glassmorphism */
    background-color: var(--bg-glass);
    backdrop-filter: var(--glass-filter);
    -webkit-backdrop-filter: var(--glass-filter);
    border: var(--glass-border);

    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: var(--shadow-neumorphic);
}

.step-number {
    font-size: 1.2rem;
    color: var(--accent-primary);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.step-title {
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.step-image {
    width: 100%;
    margin-top: 20px;
    /* Already gets .img-styled glass effect via class, but ensuring reset if needed */
}

/* Workflow Section */
.workflow-section {
    padding-bottom: 80px;
}

/* Reusing grid layout, but can define specific if needed */
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.workflow-card {
    background-color: var(--bg-glass);
    backdrop-filter: var(--glass-filter);
    -webkit-backdrop-filter: var(--glass-filter);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-neumorphic);
    border: var(--glass-border);
    height: 100%;
}

.workflow-card:hover {
    transform: translateY(-5px);
}

.workflow-card h3 {
    margin-bottom: 15px;
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.workflow-card p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.workflow-list {
    list-style-type: disc;
    padding-left: 20px;
    color: var(--text-secondary);
    margin-top: 10px;
}

.workflow-list li {
    margin-bottom: 10px;
    line-height: 1.5;
}
