/* Notion-inspired design language - Black & white, minimal, clean */

:root {
    --bg: #ffffff;
    --bg-secondary: #f7f6f3;
    --bg-tertiary: #f1f1ef;
    --text: #37352f;
    --text-secondary: #6b6b6b;
    --text-muted: #9b9a97;
    --border: #e8e8e8;
    --border-hover: #d3d3d3;
    --accent: #37352f;
    --accent-hover: #2f2d2a;
    --white: #ffffff;
    --btn-primary-bg: var(--accent);
    --btn-primary-text: var(--white);
    --max-width: 900px;
    --radius: 6px;
    --radius-sm: 4px;
    --transition: 0.15s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
    --bg: #191919;
    --bg-secondary: #252525;
    --bg-tertiary: #2f2f2f;
    --text: #ebebeb;
    --text-secondary: #b3b3b3;
    --text-muted: #8c8c8c;
    --border: #3d3d3d;
    --border-hover: #525252;
    --accent: #ebebeb;
    --accent-hover: #ffffff;
    --white: #ebebeb;
    /* Button/skip link: light bg + dark text in dark mode */
    --btn-primary-bg: #ebebeb;
    --btn-primary-text: #191919;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    overflow-x: hidden;
}

/* Skip link - accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.75rem 1rem;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius);
    z-index: 10001;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header - Clean, minimal (site chrome only; do not match <header> inside sections/articles) */
body > header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}
.logo img {
    height: 32px;
    width: auto;
}
[data-theme="dark"] .logo img,
[data-theme="dark"] .footer-logo {
    filter: invert(1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text);
    font-size: 1.25rem;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.375rem 0;
    transition: var(--transition);
}

nav a:hover,
nav a:focus,
nav a.active {
    color: var(--text);
}
nav a.active {
    font-weight: 600;
}

.language-switcher {
    display: flex;
    gap: 0.25rem;
}

.language-switcher button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: var(--transition);
}

.language-switcher button:hover,
.language-switcher button:focus {
    background: var(--bg-tertiary);
    color: var(--text);
    border-color: var(--border-hover);
}
.language-switcher button.active {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border-color: var(--btn-primary-bg);
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}
.theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text);
}
.theme-icon-light {
    display: none;
}
[data-theme="dark"] .theme-icon-dark {
    display: none;
}
[data-theme="dark"] .theme-icon-light {
    display: inline;
}

/* Hero - Clean, spacious, no gradient */
.hero {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem;
}

.hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
}

.cta-button.primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}

.cta-button.primary:hover {
    background: var(--accent-hover);
}

.cta-button.secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.cta-button.secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

/* Hero visual - Notion-style blocks */
.hero-visual {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.floating-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.floating-card:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.floating-card i {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* About Section */
#about {
    padding: 5rem 2rem;
    background: var(--bg-secondary);
}

.about-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.about-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.about-content > p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 680px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.about-card {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.about-card:hover,
.about-card:focus {
    background: var(--bg);
    border-color: var(--border-hover);
}

.card-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.about-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Services Section */
#services {
    padding: 5rem 2rem;
    background: var(--bg);
}

.services-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

#services h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.services-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.service-card {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.service-card:hover,
.service-card:focus {
    border-color: var(--border-hover);
    background: var(--bg-secondary);
}

.service-icon-wrapper {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.service-icon {
    font-size: 1.125rem;
    color: var(--text);
}

.service-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.service-features {
    list-style: none;
}

.service-features li {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
    padding-left: 1.25rem;
    position: relative;
}

.service-features li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* Home — Tools teaser */
#tools {
    padding: 5rem 2rem;
    background: var(--bg-secondary);
}

#tools .about-content > p {
    margin-bottom: 1.5rem;
}

/* Notion-style stroke icons (tools cards & tool headers) */
.tool-icon-notion {
    display: block;
    width: 2rem;
    height: 2rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.app-tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 720px;
    margin: 0 auto 1.25rem;
    text-align: left;
}

@media (min-width: 768px) {
    .app-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: var(--max-width);
    }
}

.app-tool-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.app-tool-card:hover {
    border-color: var(--text-muted);
}

.app-tool-card h3,
.app-tool-card h2.tools-hub-card-title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
}

.app-tool-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
    line-height: 1.5;
}

.app-tool-card-cta {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-top: 0.25rem;
}

.app-tool-card:hover .app-tool-card-cta {
    text-decoration: underline;
}

.app-tools-footer {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.app-tools-browse-all {
    gap: 0.5rem;
    min-width: 11rem;
}

.app-tools-browse-icon {
    flex-shrink: 0;
    opacity: 0.9;
}

@media (max-width: 480px) {
    .app-tools-browse-all {
        width: 100%;
        max-width: 20rem;
    }
}

.tools-hub-grid {
    margin-bottom: 0;
}

.tools-hub-grid .app-tool-card {
    background: var(--bg-secondary);
}

@media (min-width: 768px) {
    .tools-hub-grid {
        max-width: 900px;
    }
}

/* Contact Section */
#contact {
    padding: 5rem 2rem;
    background: var(--bg-secondary);
}

.contact-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.contact-container h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.contact-container > p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 540px;
}

.contact-info {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.contact-item--stack {
    align-items: flex-start;
}

.contact-item--stack > div > p {
    margin: 0 0 0.25rem;
}

.contact-item--stack > div > p:last-child {
    margin-bottom: 0;
}

.contact-item__title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem !important;
}

.contact-item i {
    color: var(--text-muted);
    font-size: 1rem;
}

.contact-item--stack i {
    margin-top: 0.125rem;
}

.email-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.email-link:hover {
    text-decoration: underline;
}

.contact-form {
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--bg);
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--text);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Captcha */
.captcha-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.captcha-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.captcha-group input[type="number"] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    max-width: 100px;
}

.refresh-captcha {
    background: var(--bg-tertiary);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.refresh-captcha:hover {
    background: var(--border);
}

.cta-container {
    margin-top: 0.5rem;
}

.cta-container .cta-button.primary {
    width: 100%;
}

/* Footer */
footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 2.5rem 2rem 1.5rem;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.footer-logo {
    height: 28px;
    margin-bottom: 0.75rem;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.375rem;
}

.footer-section ul li a,
.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.footer-section ul li a:hover,
.footer-section a:hover {
    color: var(--text);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    body > header {
        padding: 1rem 1.25rem;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s;
        z-index: 999;
    }
    .header-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    .nav-menu ul {
        flex-direction: column;
        gap: 0;
    }
    .nav-menu li {
        border-bottom: 1px solid var(--border);
    }
    .nav-menu a {
        display: block;
        padding: 1rem;
    }
    .header-nav .language-switcher {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
    }

    nav ul {
        gap: 1.25rem;
    }

    .hero {
        padding: 6rem 1.5rem 3rem;
    }

    .hero-visual {
        grid-template-columns: 1fr;
        margin-top: 2.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-cards {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .cta-button {
        width: 100%;
    }
}

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

    .hero-subtitle {
        font-size: 1.0625rem;
    }
}
