/* Aligns with kutty.io/desktop/src/index.css (shadcn slate + IBM Plex Mono) */
:root {
    --radius: 0.5rem;

    --primary: hsl(222.2 47.4% 11.2%);
    --on-primary: hsl(210 40% 98%);
    --primary-hover: hsl(222.2 47.4% 18%);
    --primary-light: hsl(210 40% 96%);
    --primary-border: hsl(214.3 31.8% 91.4%);

    --success: hsl(142.1 76.2% 36.3%);
    --success-bg: hsl(142.1 76.2% 36.3% / 0.1);
    --success-border: hsl(142.1 76.2% 36.3% / 0.25);

    --text-primary: hsl(222.2 84% 4.9%);
    --text-secondary: hsl(215.4 16.3% 46.9%);
    --text-muted: hsl(215.4 16.3% 46.9%);
    --text-light: hsl(215.4 16.3% 56.9%);

    --bg-primary: hsl(0 0% 100%);
    --bg-secondary: hsl(210 40% 96%);
    --bg-card: hsl(0 0% 100%);

    --border-light: hsl(214.3 31.8% 91.4%);
    --border-subtle: hsl(214.3 31.8% 91.4% / 0.6);

    --shadow-light: rgba(15, 23, 42, 0.08);
    --shadow-medium: rgba(15, 23, 42, 0.12);

    --finance: hsl(0 72% 51%);
    --subscriptions: hsl(142.1 76.2% 36.3%);
    --notes: hsl(221.2 83.2% 53.3%);
    --todos: hsl(32.1 95% 44%);
    --calendar: hsl(199 89% 48%);
    --habits: hsl(280 65% 48%);
    --documents: hsl(215 25% 42%);
    --people: hsl(330 70% 52%);
    --assistant: hsl(262 83% 58%);
    --worklog: hsl(187 72% 38%);
}

body.dark-mode {
    --primary: hsl(210 40% 98%);
    --on-primary: hsl(222.2 47.4% 11.2%);
    --primary-hover: hsl(210 40% 90%);
    --primary-light: hsl(217.2 32.6% 17.5%);
    --primary-border: hsl(217.2 32.6% 17.5%);

    --text-primary: hsl(210 40% 98%);
    --text-secondary: hsl(215 20.2% 65.1%);
    --text-muted: hsl(215 20.2% 65.1%);
    --text-light: hsl(215 20.2% 55.1%);

    --bg-primary: hsl(222.2 84% 4.9%);
    --bg-secondary: hsl(217.2 32.6% 12%);
    --bg-card: hsl(222.2 84% 4.9%);

    --border-light: hsl(217.2 32.6% 17.5%);
    --border-subtle: hsl(217.2 32.6% 17.5% / 0.8);

    --shadow-light: rgba(0, 0, 0, 0.35);
    --shadow-medium: rgba(0, 0, 0, 0.45);

    --assistant: hsl(270 75% 65%);
    --worklog: hsl(187 55% 52%);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 32px;
    width: auto;
    max-width: 100%;
}

.brand-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-light);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    color: var(--text-muted);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.dark-icon {
    display: none !important;
}

.light-icon {
    display: block !important;
}

/* Logo switching */
.dark-logo {
    display: none;
}

/* Dark mode styles - now handled by CSS custom properties */

/* Dark mode logo switching */
body.dark-mode .light-logo {
    display: none;
}

body.dark-mode .dark-logo {
    display: block;
}

body.dark-mode .light-icon {
    display: none !important;
}

body.dark-mode .dark-icon {
    display: block !important;
}

/* Hero Section — compact, fits one screen on typical laptops */
.hero {
    padding: 0 0 16px;
    background: var(--bg-primary);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 28px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.hero-header .logo {
    height: 26px;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 28px 16px;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
    gap: 24px 32px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
    min-height: 0;
}

.hero-content {
    text-align: left;
    max-width: 560px;
    padding-right: 0;
    padding-top: 0;
}

.hero-cards {
    min-width: 0;
    background: transparent;
    border: none;
    padding: 0;
}

.hero-cards-intro {
    margin-bottom: 10px;
}

.hero-cards-heading {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.hero-cards-lede {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

.hero-ai-spotlight {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-secondary);
}

.hero-ai-spotlight-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.hero-ai-spotlight-list {
    margin: 0;
    padding: 0 0 0 1.1rem;
    list-style: disc;
    color: var(--text-secondary);
    font-size: 0.68rem;
    line-height: 1.45;
}

.hero-ai-spotlight-list li {
    margin-bottom: 6px;
}

.hero-ai-spotlight-list li:last-child {
    margin-bottom: 0;
}

.hero-ai-spotlight-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 2.125rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
    font-weight: 400;
    line-height: 1.45;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
}

.hero-badge i {
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 0;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    min-width: 0;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--on-primary);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.feature-cards.feature-cards--hero {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    max-width: none;
    margin: 0;
    padding: 0;
}

.hero-cards .feature-card {
    padding: 10px 10px 10px 12px;
}

.hero-cards .feature-card-icon {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.hero-cards .card-title {
    font-size: 0.78rem;
    margin-bottom: 2px;
    line-height: 1.2;
}

.hero-cards .card-description {
    font-size: 0.68rem;
    line-height: 1.3;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px var(--shadow-light);
}

.hero-cards .feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-light);
}

.feature-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.feature-card.finance::before {
    background: var(--finance);
}

.feature-card.subscriptions::before {
    background: var(--subscriptions);
}

.feature-card.notes::before {
    background: var(--notes);
}

.feature-card.todos::before {
    background: var(--todos);
}

.feature-card.calendar::before {
    background: var(--calendar);
}

.feature-card.habits::before {
    background: var(--habits);
}

.feature-card.documents::before {
    background: var(--documents);
}

.feature-card.people::before {
    background: var(--people);
}

.feature-card.assistant::before {
    background: var(--assistant);
}

.feature-card.worklog::before {
    background: var(--worklog);
}

.feature-card-icon {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1;
}

.feature-card .card-title {
    margin-bottom: 10px;
}

.feature-card .card-description {
    margin: 0;
    line-height: 1.5;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--subscriptions);
}

.trend-text {
    font-weight: 500;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.card-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Documentation Section */
.docs {
    padding: 100px 0;
    background: var(--bg-primary);
}

.docs-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.docs-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.docs-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.code-block {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 40px;
    border: 1px solid var(--border-light);
    text-align: left;
}

.code-block pre {
    margin: 0;
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.code-block code {
    color: var(--text-primary);
}

.system-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-item i {
    color: var(--primary);
    font-size: 1.2rem;
}

.docs-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border-light);
    margin-top: 80px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 56px 22px 20px;
        align-items: start;
    }

    .feature-cards.feature-cards--hero {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .feature-cards:not(.feature-cards--hero) {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header {
        margin-bottom: 48px;
    }
}

/* Short viewports: trim copy so the fold stays visible */
@media (max-height: 760px) {
    .hero-cards-lede {
        display: none;
    }

    .hero-love,
    .hero-made-in,
    .hero-ai-spotlight {
        display: none;
    }

    .hero-container {
        padding-top: 56px;
    }
}

@media (max-height: 640px) {
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }

    .hero-subtitle {
        font-size: 0.8125rem;
        margin-bottom: 10px;
    }

    .hero-badge {
        margin-bottom: 8px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-header {
        padding: 15px 20px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 16px;
        padding: 52px 18px 20px;
    }

    .hero-cards {
        text-align: left;
    }

    .hero-cards-intro {
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
        max-width: 100%;
        padding-right: 0;
    }
    
    .hero-title {
        font-size: 1.65rem;
        margin-bottom: 10px;
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
        margin-bottom: 14px;
    }

    .hero-cards-heading {
        font-size: 0.875rem;
    }

    .hero-cards-lede {
        font-size: 0.8125rem;
    }

    .hero-ai-spotlight {
        margin-top: 12px;
    }

    .hero-ai-spotlight-title {
        text-align: center;
    }

    .hero-ai-spotlight-list {
        font-size: 0.75rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        min-width: auto;
    }
    
    .hero-love {
        text-align: center;
        padding: 15px 0 0;
    }
    
    .hero-love p {
        justify-content: center;
    }

    .hero-made-in {
        text-align: center;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .system-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .docs-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .docs-buttons .btn {
        width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 0 0 12px;
        min-height: auto;
    }
    
    .hero-header {
        padding: 10px 14px;
    }
    
    .hero-container {
        padding: 48px 14px 16px;
        gap: 14px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 1.4rem;
        line-height: 1.2;
        margin-bottom: 8px;
    }
    
    .hero-subtitle {
        font-size: 0.8125rem;
        margin-bottom: 12px;
        line-height: 1.45;
    }

    .hero-cards-heading {
        font-size: 0.8125rem;
    }

    .hero-cards-lede {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .hero-badge {
        font-size: 12px;
        padding: 6px 12px;
        margin-bottom: 24px;
    }
    
    .hero-actions {
        gap: 10px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .hero-love {
        padding: 12px 0 0;
    }
    
    .hero-love p {
        font-size: 12px;
    }
    
    .section-header {
        margin-bottom: 50px;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .docs {
        padding: 60px 0;
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-cards-heading {
        font-size: 0.95rem;
    }

    .hero-cards-lede {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .hero-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .logo {
        height: 28px;
    }
    
    .hero-header {
        padding: 10px 12px;
    }
}

/* Prevent text size adjustment on iOS */
@media screen and (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Improve touch targets on mobile */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }
    
    .theme-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Made with Love in Hero */
.hero-love {
    text-align: left;
    padding: 8px 0 0;
    margin-top: 8px;
}

.hero-love p {
    color: var(--text-light);
    font-size: 11px;
    font-weight: 400;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-love i {
    color: var(--finance);
    font-size: 18px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.hero-made-in {
    margin: 10px 0 0;
    padding: 0;
    line-height: 1;
}

.hero-made-in-flags {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.hero-made-in-plus {
    font-size: 10px;
    font-weight: 300;
    color: var(--text-muted);
    opacity: 0.6;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Dark mode for hero love - now handled by CSS custom properties */

/* Muted emphasis — matches app foreground / secondary contrast */
.highlight {
    font-weight: 600;
    color: var(--text-primary);
    background: linear-gradient(transparent 62%, var(--primary-light) 62%);
    padding: 0 2px;
    border-radius: 2px;
    display: inline;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.highlight-bold {
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-border);
    padding-bottom: 1px;
    display: inline;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

body.dark-mode .highlight-bold {
    border-bottom-color: var(--border-light);
}
