/* ==========================================================================
   Nodws — digital craftsman theme
   Built from home.html
   ========================================================================== */

:root {
    --brand: 59 130 246;
}

html {
    scroll-behavior: smooth;
}

html.light {
    color-scheme: light;
}

body {
    transition: background-color 0.35s ease, color 0.35s ease;
}

body.menu-open {
    overflow: hidden;
}

/* ---- Utility ---- */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Hero / atmosphere ---- */

.hero-bg {
    background: radial-gradient(at 50% 30%, rgba(59, 130, 246, 0.15) 0px, transparent 52%);
}

.hero-logo svg {
    display: block;
    width: 100%;
    height: auto;
}

.geometric-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 25s linear infinite;
    z-index: 1;
    opacity: 0.6;
    pointer-events: none;
}

@keyframes gridMove {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.bento-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* Floating shapes */

.floating-shape {
    position: absolute;
    border: 1px solid rgba(59, 130, 246, 0.15);
    opacity: 0.6;
    pointer-events: none;
    will-change: transform;
    transition: opacity 0.3s ease;
}

.floating-shape:hover {
    opacity: 0.9;
}

.shape-circle  { border-radius: 50%; }
.shape-square  { }
.shape-squircle { border-radius: 30%; }
.shape-triangle {
    width: 0 !important;
    height: 0 !important;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 100px solid rgba(59, 130, 246, 0.15);
    background: none;
}

/* Scroll entrance animations */

.section-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html:not(.js) .section-animate {
    opacity: 1;
    transform: none;
}

/* ---- Accessibility ---- */

.skip-link {
    position: fixed;
    top: -100px;
    left: 1rem;
    z-index: 200;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: #fff;
    color: #09090b;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

:focus-visible {
    outline: 2px solid rgb(var(--brand));
    outline-offset: 3px;
}

/* ---- Article / page content ---- */

.article-content {
    font-size: 1.125rem;
    line-height: 1.85;
}

.article-content > * + * {
    margin-top: 1.5em;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: 'Space Grotesk', Inter, sans-serif;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fafafa;
    margin-top: 2.25em;
    margin-bottom: 0.65em;
}

.article-content h1 { font-size: clamp(2rem, 4vw, 3rem); }
.article-content h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.article-content h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }

.article-content p {
    margin-bottom: 1.4em;
}

.article-content a {
    color: #60a5fa;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.article-content a:hover {
    color: #93c5fd;
}

.article-content ul,
.article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5em;
}

.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }

.article-content li {
    margin-bottom: 0.5em;
}

.article-content blockquote {
    border-left: 2px solid rgb(var(--brand));
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 2rem 0;
    color: #d4d4d8;
    font-size: 1.15em;
    font-style: italic;
}

.article-content code {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.4rem;
    padding: 0.15em 0.45em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.88em;
}

.article-content pre {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 1rem;
    padding: 1.25rem;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.7;
}

.article-content pre code {
    background: none;
    border: 0;
    padding: 0;
}

.article-content img,
.article-content video,
.article-content iframe {
    max-width: 100%;
    border-radius: 1rem;
}

.article-content hr {
    border-color: #27272a;
    margin: 2.5rem 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.article-content th,
.article-content td {
    border: 1px solid #27272a;
    padding: 0.65rem 0.85rem;
    text-align: left;
}

.article-content th {
    background: #18181b;
}

/* ---- Scrollbar ---- */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #09090b;
}

::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 999px;
    border: 2px solid #09090b;
}

::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

/* ---- Selection ---- */

::selection {
    background-color: rgb(var(--brand));
    color: #fff;
}

/* ==========================================================================
   Light theme overrides
   ========================================================================== */

html.light body {
    background-color: #f9fafb;
    color: #111827;
}

html.light .hero-bg {
    background: radial-gradient(at 50% 30%, rgba(59, 130, 246, 0.13) 0px, transparent 52%);
}

html.light .geometric-bg {
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.10) 1px, transparent 1px);
    opacity: 0.5;
}

html.light .floating-shape {
    border-color: rgba(59, 130, 246, 0.25);
}

html.light #sv1 {
    fill: #222;
}

html.light .bg-zinc-950,
html.light .bg-black,
html.light .bg-neutral-950 {
    background-color: #f9fafb;
}

html.light .bg-zinc-900 {
    background-color: #ffffff;
}

html.light .bg-zinc-800 {
    background-color: #f3f4f6;
}

html.light .bg-white\/10 {
    background-color: rgba(15, 23, 42, 0.06);
}

html.light .text-zinc-100,
html.light .text-zinc-200,
html.light .text-zinc-300,
html.light .text-zinc-400 {
    color: #1f2937;
}

html.light .text-zinc-500 {
    color: #4b5563;
}

html.light .text-zinc-600 {
    color: #6b7280;
}

html.light .text-zinc-700 {
    color: #4b5563;
}

html.light .text-white {
    color: #1d4ed8;
}

html.light .bg-white {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06),
                0 10px 30px -18px rgba(15, 23, 42, 0.35);
}

html.light .border-zinc-700,
html.light .border-zinc-800,
html.light .border-zinc-900 {
    border-color: #e5e7eb;
}

html.light .divide-zinc-900 > :not([hidden]) ~ :not([hidden]) {
    border-color: #e5e7eb;
}

html.light .article-content h1,
html.light .article-content h2,
html.light .article-content h3,
html.light .article-content h4 {
    color: #0f172a;
}

html.light .article-content a {
    color: #1d4ed8;
}

html.light .article-content a:hover {
    color: #1e40af;
}

html.light .article-content blockquote {
    color: #374151;
}

html.light .article-content code,
html.light .article-content pre,
html.light .article-content th {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

html.light .article-content th,
html.light .article-content td {
    border-color: #e5e7eb;
}

html.light .article-content hr {
    border-color: #e5e7eb;
}

html.light ::-webkit-scrollbar-track {
    background: #f9fafb;
}

html.light ::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-color: #f9fafb;
}

html.light ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ---- Sidebar newsletter form ---- */

.sidebar-newsletter .litesite-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sidebar-newsletter .form-description {
    display: none;
}

.sidebar-newsletter .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0;
}

.sidebar-newsletter label {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.65rem;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a1a1aa;
}

.sidebar-newsletter .required {
    color: #60a5fa;
    margin-left: 0.15rem;
}

.sidebar-newsletter input[type="text"],
.sidebar-newsletter input[type="email"],
.sidebar-newsletter input[type="tel"],
.sidebar-newsletter textarea {
    width: 100%;
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 0.75rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.875rem;
    color: #e4e4e7;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-newsletter input::placeholder,
.sidebar-newsletter textarea::placeholder {
    color: #52525b;
}

.sidebar-newsletter input:focus,
.sidebar-newsletter textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.sidebar-newsletter .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: 0;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-newsletter .btn-primary {
    background: #fafafa;
    color: #09090b;
}

.sidebar-newsletter .btn-primary:hover {
    background: #e4e4e7;
    transform: translateY(-1px);
}

.sidebar-newsletter .form-error {
    font-size: 0.85rem;
    color: #f87171;
}

.litesite-form .form-notice {
    border-radius: 0.75rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

.litesite-form .form-notice-success {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #93c5fd;
}

.litesite-form .form-notice-error {
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.litesite-form .form-notice ul {
    margin: 0;
    padding-left: 1rem;
    list-style: disc;
}

/* ---- Service cards inside page copy ---- */

.article-content .service-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-content .service-card:hover {
    color: inherit;
}

.article-content .service-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
}

.article-content .service-card p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

html.light .sidebar-newsletter label {
    color: #6b7280;
}

html.light .sidebar-newsletter input[type="text"],
html.light .sidebar-newsletter input[type="email"],
html.light .sidebar-newsletter input[type="tel"],
html.light .sidebar-newsletter textarea {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #111827;
}

html.light .sidebar-newsletter input::placeholder,
html.light .sidebar-newsletter textarea::placeholder {
    color: #9ca3af;
}

html.light .sidebar-newsletter .btn-primary {
    background: #111827;
    color: #ffffff;
}

html.light .sidebar-newsletter .btn-primary:hover {
    background: #1f2937;
}

html.light .litesite-form .form-notice-success {
    background: rgba(59, 130, 246, 0.10);
    border-color: rgba(59, 130, 246, 0.30);
    color: #1d4ed8;
}

html.light .litesite-form .form-notice-error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.30);
    color: #b91c1c;
}

/* ---- Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .geometric-bg,
    .floating-shape,
    .bento-card,
    .section-animate {
        animation: none !important;
        transition: none !important;
    }

    .section-animate {
        opacity: 1;
        transform: none;
    }
}
