/* ========================================
   Pitchy Jots - Landing Page Styles
   ======================================== */

/* CSS Custom Properties */
:root {
    /* Primary - Yellow sticky note */
    --primary: #FFE066;
    --primary-light: #FFF3B8;
    --primary-dark: #E6C94D;

    /* Accent for CTAs */
    --accent: #FF9F0A;
    --accent-light: #FFB340;
    --accent-dark: #E88E00;

    /* Backgrounds (dark mode) */
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #666666;
    --text-on-primary: #333333;

    /* Borders */
    --border: #2a2a2a;
    --border-light: #3a3a3a;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.is-dragging {
    cursor: grabbing;
    user-select: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

/* ========================================
   Layout
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: 80px 0;
}

.section-alt {
    background-color: var(--bg-secondary);
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: 46px;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 40px;
    margin-bottom: var(--space-xl);
    text-align: center;
}

h3 {
    font-size: 22px;
    margin-bottom: var(--space-sm);
}

p {
    color: var(--text-secondary);
}

/* ========================================
   Header / Navigation
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.logo img {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 15px;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-cta {
    background: var(--primary);
    color: var(--text-on-primary) !important;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.nav-cta:hover {
    background: var(--primary-light);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 64px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-text {
    max-width: 520px;
}

.hero h1 {
    margin-bottom: var(--space-lg);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.5;
}

/* ========================================
   Demo Area
   ======================================== */

.demo-area {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 500px;
    margin: 0 auto;
}

.demo-menubar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: linear-gradient(180deg, #2a2a2a 0%, #1e1e1e 100%);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 12px;
    z-index: 20;
}

.menubar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menubar-icon {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

/* Wrapper for icon + hint (hint stays static while icon pulses) */
.drag-trigger-wrapper {
    position: relative;
}

.drag-trigger {
    position: relative;
    width: 18px;
    height: 18px;
    cursor: grab;
    transition: transform var(--transition-fast);
}

.drag-trigger:hover {
    transform: scale(1.2);
}

.drag-trigger:active {
    cursor: grabbing;
}

.drag-trigger.attention {
    animation: iconAttention 1.2s ease-out !important;
}

.drag-trigger img,
.drag-trigger canvas {
    width: 100%;
    height: 100%;
}

.sticker-icon-canvas {
    display: block;
}

/* Progress fill container */
.icon-progress-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-mask-image: url('../assets/mask.svg');
    mask-image: url('../assets/mask.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    pointer-events: none;
}

.icon-progress {
    width: 100%;
    height: 100%;
    background-color: var(--primary-light);
    transform: translateY(100%);
    transition: transform 0.05s linear;
}

/* Demo hint with arrow - centered under icon */
.demo-hint {
    position: absolute;
    top: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
    transition: opacity var(--transition-normal);
    z-index: 20;
    pointer-events: none;
}

.hint-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* Drag line SVG */
.drag-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.drag-line line {
    stroke: var(--primary);
    stroke-width: 2;
    stroke-dasharray: 8 4;
}

.drag-line circle {
    fill: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary));
}

/* Note panel */
.note-panel {
    position: absolute;
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translate(-50%, 0) scale(0.8);
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    z-index: 20;
}

.note-panel.visible {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
    pointer-events: auto;
}

.note-panel[data-category="yellow"] {
    border-top: 3px solid var(--primary);
}

.note-panel[data-category="green"] {
    border-top: 3px solid #4CD964;
}

.note-panel[data-category="blue"] {
    border-top: 3px solid #5AC8FA;
}

.note-panel textarea {
    width: 100%;
    min-height: 100px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    resize: none;
    outline: none;
}

.note-panel textarea::placeholder {
    color: var(--text-muted);
}

/* Note preview (created note animation) */
.note-preview {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--text-on-primary);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(255, 224, 102, 0.3);
    z-index: 30;
}

.note-preview.category-yellow {
    background: var(--primary);
}

.note-preview.category-green {
    background: #4CD964;
}

.note-preview.category-blue {
    background: #5AC8FA;
}

/* ========================================
   Sticky Notes (Drag & Drop)
   ======================================== */

.sticky-note {
    position: absolute;
    width: 180px;
    min-height: 140px;
    background: var(--primary);
    border-radius: 12px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.15);
    transition: box-shadow var(--transition-fast);
    z-index: 10;
    overflow: hidden;
    transform-origin: top center;
}

.sticky-note.dragging {
    cursor: grabbing;
    z-index: 100;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 16px 48px rgba(0, 0, 0, 0.2);
}

.sticky-note.dropped {
    animation: stickyDrop 0.3s ease-out;
}

.sticky-note.removing {
    animation: stickyRemove 0.2s ease-out forwards;
}

.sticky-header {
    display: flex;
    justify-content: flex-end;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.05);
    cursor: grab;
    user-select: none;
}

.sticky-header:active {
    cursor: grabbing;
}

.sticky-note.note-dragging {
    z-index: 100;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 16px 48px rgba(0, 0, 0, 0.2);
}

.sticky-note.note-dragging .sticky-header {
    cursor: grabbing;
}

.sticky-close {
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.sticky-close::before,
.sticky-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 2px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 1px;
    transition: background var(--transition-fast);
}

.sticky-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.sticky-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.sticky-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.sticky-close:hover::before,
.sticky-close:hover::after {
    background: rgba(0, 0, 0, 0.8);
}

.sticky-textarea {
    width: 100%;
    height: 110px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-on-primary);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    outline: none;
}

.sticky-textarea::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

@keyframes stickyDrop {
    0% {
        transform: scale(1.05);
    }
    50% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes stickyRemove {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* ========================================
   Animations
   ======================================== */

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

@keyframes iconAttention {
    0% {
        transform: scale(1);
    }
    20% {
        transform: scale(2.5);
    }
    40% {
        transform: scale(1.8) rotate(-5deg);
    }
    60% {
        transform: scale(2) rotate(5deg);
    }
    80% {
        transform: scale(1.5) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes noteAppear {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes panelAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, 0) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

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

/* ========================================
   CTA Button
   ======================================== */

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
    color: var(--bg-primary);
}

.cta-button svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Steps / How it Works
   ======================================== */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.step {
    text-align: center;
    padding: var(--space-xl);
}

.step-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-lg);
    background: var(--primary);
    color: var(--text-on-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.step h3 {
    color: var(--text-primary);
}

.step p {
    font-size: 15px;
}

/* ========================================
   Use Cases / Perfect For
   ======================================== */

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.use-case {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.use-case:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.use-case h3 {
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

/* ========================================
   Features Grid
   ======================================== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: border-color var(--transition-fast);
}

.feature-card:hover {
    border-color: var(--border-light);
}

.feature-card h3 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.feature-card p {
    font-size: 15px;
    margin-top: var(--space-sm);
}

/* ========================================
   FAQ Accordion
   ======================================== */

.faq-list {
    max-width: 800px;
    margin: var(--space-2xl) auto 0;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) 0;
    cursor: pointer;
    user-select: none;
}

.faq-question h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.faq-question::after {
    content: '+';
    font-size: 24px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding-bottom: var(--space-lg);
    font-size: 15px;
    line-height: 1.7;
}

/* ========================================
   Resources
   ======================================== */

.resources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.resource-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.resource-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.resource-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.resource-card p {
    font-size: 15px;
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent) 100%);
    text-align: center;
}

.cta-section h2 {
    color: var(--text-on-primary);
}

.cta-section p {
    color: var(--text-on-primary);
    opacity: 0.9;
    font-size: 18px;
    margin-bottom: var(--space-xl);
}

.cta-button-large {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-2xl);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 600;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cta-button-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
}

.cta-button-large svg {
    width: 24px;
    height: 24px;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--bg-secondary);
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
}

.footer-brand img {
    width: 28px;
    height: 28px;
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-lang {
    display: flex;
    gap: var(--space-md);
}

.footer-lang a {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-lang a.active {
    color: var(--text-primary);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 13px;
}

/* ========================================
   Language Banner
   ======================================== */

.language-banner {
    position: fixed;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: fadeInUp 0.3s ease;
}

.banner-flag {
    font-size: 24px;
}

.banner-text {
    color: var(--text-secondary);
    font-size: 14px;
}

.banner-accept {
    background: var(--primary);
    color: var(--text-on-primary);
    border: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.banner-accept:hover {
    background: var(--primary-light);
}

.banner-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: var(--space-xs);
    line-height: 1;
}

.banner-dismiss:hover {
    color: var(--text-primary);
}

/* ========================================
   Responsive - Tablet (768px)
   ======================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .section {
        padding: 60px 0;
    }

    /* Header */
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    /* Hero */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
    }

    .demo-area {
        max-width: 320px;
    }

    /* Steps */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    /* Use cases */
    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Resources */
    .resources-grid {
        grid-template-columns: 1fr;
    }

    /* Language banner */
    .language-banner {
        flex-wrap: wrap;
        justify-content: center;
        max-width: calc(100% - var(--space-xl));
    }
}

/* ========================================
   Responsive - Mobile (480px)
   ======================================== */

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .container {
        padding: 0 var(--space-md);
    }

    .section {
        padding: 48px 0;
    }

    /* Hero */
    .hero-subtitle {
        font-size: 17px;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
    }

    /* Use cases */
    .use-cases-grid {
        grid-template-columns: 1fr;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* CTA */
    .cta-button-large {
        width: 100%;
        justify-content: center;
    }

    /* Footer */
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }
}

/* ========================================
   Utility Classes
   ======================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}
