/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Space Mono', monospace;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.03em;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    letter-spacing: -0.04em;
}

/* Cursor animation for title */
.cursor {
    display: inline-block;
    margin-left: 3px;
    font-weight: 100;
    animation: blink 1s step-end infinite;
    font-family: monospace;
}

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

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: left;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: #000;
    bottom: -10px;
    left: 0;
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

section:hover h2::after {
    transform: scaleX(1);
}

.features h2, .who-its-for h2, .how-it-works h2, .final-cta h2 {
    text-align: center;
}

.features h2::after, .who-its-for h2::after, .how-it-works h2::after, .final-cta h2::after {
    left: calc(50% - 30px);
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

section {
    padding: 5rem 0;
    border-bottom: 1px solid #eee;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero section doesn't need the same animation */
.hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: 90vh;
    padding-top: 55px; /* Adjusted to account for smaller navbar */
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: contain; /* Ensures images maintain aspect ratio */
}

img:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1); /* Reduced shadow */
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 20px; /* Further reduced from 0.6rem */
    max-width: 900px;
    margin: 0 auto;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem; /* Further reduced */
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 26px; /* Further reduced from 32px */
    width: auto;
    max-width: 100%;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-menu li {
    margin-left: 1.5rem; /* Increased from 1rem */
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    padding: 4px 0;
    display: inline-block;
    font-size: 0.9rem;
    letter-spacing: 0.03em; /* Added letter spacing */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #000;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: #000;
}

.nav-cta {
    padding: 0.3rem 0.8rem; /* Reduced padding */
    margin-left: 0.8rem; /* Reduced margin */
    font-size: 0.8rem; /* Smaller font */
    color: #fff !important;
}

.menu-toggle {
    display: none; /* Hide by default on desktop */
    cursor: pointer;
    z-index: 1001;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    position: relative;
    right: 0;
}

.menu-icon {
    font-size: 28px;
    color: #000;
    transition: transform 0.3s ease;
    display: block;
}

/* X animation for menu toggle */
.menu-toggle.active .menu-icon {
    transform: rotate(90deg);
}

.nav-link {
    padding: 15px 0;
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    display: block;
}

.cta-button {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem; /* Smaller padding */
    font-size: 0.9rem; /* Smaller font */
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-height: 36px; /* Reduced from 44px */
    min-width: 100px; /* Reduced from 120px */
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
    z-index: -1;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:active {
    transform: translateY(1px);
}

/* Hero Section */
.hero-content {
    flex: 1;
    animation: fadeInLeft 1s ease forwards;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    animation: fadeInRight 1s ease forwards;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tagline {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    animation: fadeIn 1s ease forwards 0.3s;
    opacity: 0;
}

.subtext {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease forwards 0.6s;
    opacity: 0;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Content-Image Layout */
.content-image-wrapper {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.content-image-wrapper .content,
.content-image-wrapper .image {
    flex: 1;
}

.content-image-wrapper.reverse {
    flex-direction: row-reverse;
}

.content-image-wrapper .image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-image-wrapper .content h2 {
    margin-top: 0;
}

/* Features Section */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.3s ease;
    padding: 1rem;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1);
}

/* Who It's For Section */
.users-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.user-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.3s ease;
    padding: 20px;
    border-radius: 8px;
}

.user-item:hover {
    background-color: #f9f9f9;
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.user-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.user-item:hover .user-icon {
    transform: scale(1.1);
}

/* Screenshots Section */
.screenshot-slider {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.screenshot-item {
    text-align: center;
    transition: transform 0.4s ease;
}

.screenshot-item:hover {
    transform: scale(1.02);
}

.screenshot-item p {
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    display: inline-block;
}

.screenshot-item p::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #000;
    transition: all 0.3s ease;
}

.screenshot-item:hover p::after {
    width: 100%;
    left: 0;
}

/* How It Works Section */
.steps {
    display: flex;
    justify-content: space-between;
    max-width: 700px;
    margin: 0 auto;
}

.step {
    text-align: center;
    flex: 1;
    position: relative;
    transition: transform 0.3s ease;
    padding: 0 10px;
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    background-color: #000;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 2px;
    background-color: #eee;
    z-index: -1;
}

/* Final CTA Section */
.final-cta {
    text-align: center;
}

.value-prop {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: #555;
}

/* Animation for scroll reveal */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries */
@media (max-width: 992px) {
    section {
        padding: 4rem 0;
    }
    
    .feature-grid, .users-grid {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        min-height: auto;
        padding-top: 1rem;
    }
    
    .content-image-wrapper,
    .content-image-wrapper.reverse {
        flex-direction: column;
        gap: 2rem;
    }
    
    .feature-grid, .users-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .steps {
        flex-direction: column;
        gap: 2rem;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .tagline {
        font-size: 1.25rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    /* Mobile Menu - W3Schools Pattern */
    .nav-menu {
        position: fixed;
        left: 0;
        width: 100%;
        top: 42px; /* Further reduced from 52px */
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        padding: 0.8rem 0; /* Further reduced padding */
        z-index: 999;
        max-height: 80vh;
        overflow-y: auto;
        display: none;
    }
    
    /* When active, simply show with display block */
    .nav-menu.active {
        display: block;
        width: 230px; /* Increased from 200px */
        right: 0;
        left: auto;
        border-left: 1px solid rgba(0, 0, 0, 0.1);
        border-bottom-left-radius: 6px;
    }
    
    /* Ensure menu toggle is visible and properly styled */
    .menu-toggle {
        display: flex !important;
        cursor: pointer;
        z-index: 1001;
        width: 32px; /* Further reduced */
        height: 32px; /* Further reduced */
        align-items: center;
        justify-content: center;
        background-color: transparent;
        position: relative;
        right: 0;
    }
    
    .menu-icon {
        font-size: 22px; /* Further reduced */
        color: #000;
        transition: transform 0.3s ease;
        display: block;
    }
    
    /* X animation for menu toggle */
    .menu-toggle.active .menu-icon {
        transform: rotate(90deg);
    }
    
    .nav-link {
        padding: 12px 0;
        width: 100%;
        text-align: center;
        font-size: 1rem;
        display: block;
        letter-spacing: 0.05em; /* Increased letter spacing for mobile */
    }
    
    .nav-cta {
        margin: 1rem auto 0;
        width: 80%; /* Increased from 75% */
        max-width: 200px; /* Increased from 180px */
        padding: 10px 16px;
        display: block;
        color: #fff !important;
    }
    
    .nav-menu li {
        margin-left: 0;
        padding: 0 2rem;
        margin-bottom: 0.5rem; /* Added margin between menu items */
    }
    
    .browser-frame {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        height: 100vh;
    }
    
    .browser-content {
        min-height: 100vh;
    }
    
    .notesurf-editor {
        height: 100vh;
    }
    
    .typing-text {
        flex: 1;
    }
    
    .note-content {
        flex: 1;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .subtext {
        font-size: 1rem;
    }
    
    .feature-icon,
    .user-icon {
        font-size: 2rem;
    }
    
    section {
        padding: 2.5rem 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .cta-button {
        padding: 0.7rem 1.2rem;
        width: 100%;
        max-width: 170px;
    }
    
    .nav-container {
        padding: 0.3rem 15px;
    }
    
    .menu-toggle {
        width: 30px; /* Further reduced */
        height: 30px; /* Further reduced */
    }
    
    .nav-menu.active {
        top: 38px;
        width: 220px; /* Increased from 170px */
    }
    
    .nav-link {
        padding: 10px 0;
        font-size: 0.95rem;
        letter-spacing: 0.04em; /* Slightly reduced but still increased spacing */
    }
    
    .logo-img {
        height: 24px; /* Further reduced */
    }
    
    .nav-menu li {
        padding: 0 1.8rem;
        margin-bottom: 0.4rem; /* Slightly reduced margin for smaller screens */
    }
    
    .editor-header {
        padding: 12px;
    }
    
    .date {
        font-size: 14px;
    }
    
    .back-button, .settings-button {
        font-size: 18px;
        padding: 6px;
    }
    
    .typing-text {
        padding: 12px;
    }
    
    .timestamp {
        font-size: 14px;
    }
    
    .formatting-controls {
        gap: 12px;
    }
    
    .format-btn {
        font-size: 15px;
    }
}

/* Mobile Menu Backdrop */
.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

.menu-backdrop.active {
    display: block;
}

@media (min-width: 769px) {
    .menu-backdrop {
        display: none !important;
    }
    .nav-menu {
        width: auto;
    }
}

.logo a {
    display: block;
    transition: transform 0.3s ease;
}

.logo a:hover {
    transform: scale(1.05);
}

/* Footer link styles */
.footer-link {
    color: #000;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    margin-left: 10px;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #000;
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

/* Typing Animation Styles */
.typing-animation-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.browser-frame {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    max-width: 400px;
    height: 470px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.browser-top-bar {
    display: none;
}

.browser-content {
    position: relative;
    height: 500px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    background: white;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.notes-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
    padding: 12px;
    gap: 0;
    background-color: white;
    max-height: calc(500px - 60px); /* Account for header height */
}

.notesurf-editor {
    position: relative;
    background: white;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 500px;
}

.note {
    padding: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.current-note {
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.saved-note {
    padding: 12px;
    position: relative;
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    animation: slideInNote 0.6s forwards;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 0 0 8px 0;
    border-bottom: none;
}

@keyframes slideInNote {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timestamp {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-family: 'Space Mono', monospace;
}

.note-url {
    color: #888;
    margin-left: 5px;
}

.note-text {
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

.note-content {
    font-size: 16px;
    line-height: 1.6;
    min-height: 100px;
    position: relative;
    padding-bottom: 50px;
    padding-right: 50px;
}

.formatting-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    background-color: white;
    padding: 8px;
    border-radius: 4px;
}

#notes-history {
    display: flex;
    flex-direction: column;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.back-button, .settings-button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    color: #333;
}

.date {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.typing-text {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.format-btn {
    font-family: 'Space Mono', monospace;
    background: none;
    border: none;
    font-size: 16px;
    padding: 4px 8px;
    cursor: pointer;
    color: #333;
}

.format-btn:hover {
    background-color: #f0f0f0;
    border-radius: 4px;
}

.bold-btn {
    font-weight: bold;
}

.italic-btn {
    font-style: italic;
}

.underline-btn {
    text-decoration: underline;
}

.enter-button {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    color: #aaa;
    cursor: pointer;
    padding: 8px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.3s ease, box-shadow 0.3s ease;
    transform: translateX(5px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 300;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
    z-index: 10;
}

.enter-button.visible {
    opacity: 1;
    transform: translateX(0);
}

.enter-button:hover {
    color: #777;
    transform: translateY(-2px) translateX(0) scale(1.1);
    text-shadow: 0 3px 5px rgba(0,0,0,0.1);
}

.enter-button.pressed {
    transform: scale(0.9);
    color: #555;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.typed-text {
    color: #333;
    display: inline-block;
    position: relative;
}

.timestamp-url {
    color: #666;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    margin-bottom: 12px;
}

.time, .current-url {
    color: #666;
}

.formatting-controls {
    margin-bottom: 12px;
}

.format-btn {
    font-family: 'Space Mono', monospace;
    background: none;
    border: none;
    font-size: 16px;
    padding: 4px 8px;
    cursor: pointer;
    color: #333;
}

.format-btn:hover {
    background-color: #f0f0f0;
    border-radius: 4px;
}

.bold-btn {
    font-weight: bold;
}

.italic-btn {
    font-style: italic;
}

.underline-btn {
    text-decoration: underline;
}

.note-content {
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    line-height: 1.5;
} 