/* =====================================================================
   code-craft.ai — Marketing Site Styles
   Palette pulled from the brand mark: deep-blue gradient on parchment.
   ===================================================================== */

:root {
    --brand-deep: #0b3d91;
    --brand-mid: #1763c6;
    --brand-bright: #2e9bff;
    --brand-glow: #6cc3ff;

    --ink: #0d1b2a;
    --ink-soft: #2c3e57;
    --ink-mute: #5a6d85;
    --ink-faint: #8da3bd;

    --paper: #f7f6f1;
    --paper-2: #ffffff;
    --line: #e3e6ed;
    --line-soft: #eef0f5;

    --grad-brand: linear-gradient(135deg, #0b3d91 0%, #1763c6 50%, #2e9bff 100%);
    --grad-ink: linear-gradient(135deg, #0d1b2a 0%, #1a2e4a 100%);

    --shadow-sm: 0 1px 2px rgba(11, 61, 145, 0.06);
    --shadow-md: 0 8px 24px rgba(11, 61, 145, 0.08);
    --shadow-lg: 0 24px 60px rgba(11, 61, 145, 0.14);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --container: 1180px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--brand-mid); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--brand-deep); }

h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ink);
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 4.8vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ====== Eyebrow / accents ====== */
.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand-mid);
    margin-bottom: 1rem;
}

.grad-text {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.lede {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--ink-soft);
    max-width: 640px;
}

/* ====== Header ====== */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(247, 246, 241, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 700;
    color: var(--ink);
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.brand-logo { width: 36px; height: 36px; }
.brand-text { white-space: nowrap; }
.brand-dot { color: var(--brand-bright); }

.primary-nav { display: flex; align-items: center; }

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu a {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: background 0.18s ease, color 0.18s ease;
}

.nav-menu a:hover { color: var(--ink); background: var(--line-soft); }
.nav-menu a.active { color: var(--brand-deep); }

.nav-cta {
    background: var(--grad-brand);
    color: #fff !important;
    padding: 0.6rem 1.1rem !important;
    border-radius: 999px !important;
    font-weight: 600 !important;
    box-shadow: var(--shadow-sm);
}
.nav-cta:hover { background: var(--grad-brand); color: #fff !important; opacity: 0.92; }

.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ====== Buttons ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.78rem 1.4rem;
    font-weight: 600;
    font-size: 0.98rem;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
    font-family: inherit;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 8px 18px rgba(23, 99, 198, 0.28);
}
.btn-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(23, 99, 198, 0.36);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--brand-mid); color: var(--brand-deep); }

.btn-lg { padding: 1rem 1.7rem; font-size: 1.02rem; }

/* ====== Hero ====== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 5rem 0 5.5rem;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(23, 99, 198, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 99, 198, 0.08) 1px, transparent 1px);
    background-size: 48px 48px;
    background-position: -1px -1px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
    align-items: center;
}

.hero-copy h1 { margin-bottom: 1.2rem; }

.hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 2rem 0 2.5rem;
}

.hero-stats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
    max-width: 520px;
}
.hero-stats li { display: flex; flex-direction: column; gap: 0.2rem; }
.hero-stats strong {
    font-size: 1.6rem;
    color: var(--brand-deep);
    font-weight: 800;
    letter-spacing: -0.02em;
}
.hero-stats span { font-size: 0.85rem; color: var(--ink-mute); }

/* ====== Hero terminal visual ====== */
.terminal {
    background: #0a1628;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: rotate(-1deg);
    border: 1px solid #1c2d4a;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1rem;
    background: #0d1c33;
    border-bottom: 1px solid #1c2d4a;
}
.terminal-bar .dot {
    width: 11px; height: 11px; border-radius: 50%; display: inline-block;
}
.terminal-bar .red { background: #ff5f56; }
.terminal-bar .yellow { background: #ffbd2e; }
.terminal-bar .green { background: #27c93f; }
.terminal-title {
    margin-left: auto;
    color: #6c87b3;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.terminal-body {
    margin: 0;
    padding: 1.4rem 1.6rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.85;
    color: #cfdcef;
    white-space: pre-wrap;
}
.t-comment { color: #6c87b3; }
.t-prompt { color: var(--brand-bright); font-weight: 600; }
.t-cmd { color: #fff; font-weight: 600; }
.t-arg { color: #ffbd2e; }
.t-info { color: #27c93f; font-weight: 600; }
.t-mute { color: #6c87b3; }
.t-cursor {
    display: inline-block;
    width: 8px;
    background: var(--brand-bright);
    color: var(--brand-bright);
    animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ====== Sections ====== */
.section { padding: 5rem 0; }

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3rem;
}
.section-sub { color: var(--ink-mute); font-size: 1.05rem; }

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* ====== Feature grid ====== */
.section-features { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-glow);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(46, 155, 255, 0.12), rgba(11, 61, 145, 0.16));
    color: var(--brand-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin-bottom: 0.4rem; }
.feature-card p { color: var(--ink-mute); font-size: 0.95rem; margin: 0; }

/* ====== Philosophy / principles ====== */
.principles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.principles li {
    display: flex;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}
.principle-num {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--brand-mid);
    font-weight: 600;
    margin-top: 0.2rem;
    letter-spacing: 0.05em;
}
.principles strong { color: var(--ink); }
.principles div { color: var(--ink-soft); font-size: 0.95rem; }

/* ====== Page hero (sub-pages) ====== */
.page-hero {
    padding: 5rem 0 3rem;
    background: linear-gradient(180deg, rgba(46, 155, 255, 0.06), transparent);
    border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin-bottom: 1rem; }

/* ====== Values ====== */
.section-values { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.value-card {
    padding: 1.6rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}
.value-card h3 { color: var(--brand-deep); }

/* ====== Service blocks ====== */
.service-block {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    padding: 3rem 0;
    border-bottom: 1px solid var(--line);
}
.service-block:last-child { border-bottom: 0; }

.service-meta { display: flex; flex-direction: column; gap: 0.4rem; }
.service-num {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 2.4rem;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.service-lede {
    font-size: 1.08rem;
    color: var(--ink-soft);
    margin-bottom: 1.3rem;
}

.service-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
}
.service-list li {
    padding-left: 1.3rem;
    position: relative;
    color: var(--ink-soft);
    font-size: 0.97rem;
}
.service-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-bright);
}
.service-list strong { color: var(--ink); }

/* ====== Process steps ====== */
.section-process { background: var(--paper-2); border-top: 1px solid var(--line); }

.process-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    counter-reset: step;
}
.process-steps li {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    position: relative;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--grad-brand);
    color: #fff;
    font-weight: 700;
    font-family: var(--font-mono);
    margin-bottom: 1rem;
}

/* ====== CTA card ====== */
.section-cta { padding: 4rem 0 6rem; }

.cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 3rem;
    border-radius: var(--radius-lg);
    background: var(--grad-ink);
    color: #fff;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.cta-card::before {
    content: "";
    position: absolute;
    inset: -50% -20% auto auto;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(46, 155, 255, 0.35), transparent 60%);
    pointer-events: none;
}
.cta-card h2 { color: #fff; margin-bottom: 0.5rem; }
.cta-card p { color: rgba(255,255,255,0.78); margin: 0; max-width: 520px; }
.cta-card .btn-primary {
    background: #fff;
    color: var(--brand-deep);
    box-shadow: 0 12px 28px rgba(0,0,0,0.25);
    position: relative;
    z-index: 1;
}
.cta-card .btn-primary:hover { color: var(--brand-deep); }

/* ====== Contact ====== */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
    align-items: start;
}

.contact-channels {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
    display: grid;
    gap: 0.9rem;
}
.contact-channels li {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.2rem;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}
.contact-label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 0.2rem;
    font-weight: 600;
}
.contact-channels a {
    font-weight: 500;
    color: var(--brand-deep);
    font-family: var(--font-mono);
    font-size: 0.98rem;
}

.contact-note {
    margin-top: 1.5rem;
    padding: 1rem 1.2rem;
    background: var(--line-soft);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--ink-soft);
}
.contact-note p { margin: 0.2rem 0; }

.contact-form {
    background: var(--paper-2);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: grid;
    gap: 1.1rem;
}
.form-row { display: grid; gap: 0.4rem; }
.form-row label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ink);
}
.optional { color: var(--ink-faint); font-weight: 400; }
.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 0.78rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--paper);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: 0;
    border-color: var(--brand-mid);
    box-shadow: 0 0 0 4px rgba(23, 99, 198, 0.12);
    background: var(--paper-2);
}
.form-row textarea { resize: vertical; min-height: 120px; }
.form-note {
    font-size: 0.82rem;
    color: var(--ink-mute);
    margin: 0;
}

/* Inline status banners shown after a contact form submission. */
.contact-form--status { padding: 0; background: transparent; border: 0; box-shadow: none; }

.status-banner {
    border-radius: var(--radius-md);
    padding: 1.6rem 1.8rem;
    border: 1px solid var(--line);
}
.status-banner h2 { margin-top: 0; }
.status-banner p { margin: 0.6rem 0 0; color: var(--ink-soft); }
.status-banner--success {
    background: linear-gradient(135deg, rgba(46, 155, 255, 0.08), rgba(11, 61, 145, 0.06));
    border-color: var(--brand-glow);
}
.status-banner--success h2 { color: var(--brand-deep); }
.status-banner--error {
    background: #fdecea;
    border-color: #f5c6cb;
    color: #842029;
    margin-bottom: 1.2rem;
    padding: 1rem 1.2rem;
}
.status-banner--error strong { display: block; margin-bottom: 0.2rem; }
.status-banner--error p { color: #842029; margin: 0; }

/* ====== Footer ====== */
.site-footer {
    background: var(--paper-2);
    border-top: 1px solid var(--line);
    padding: 3.5rem 0 1.5rem;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--line);
}
.footer-tagline { color: var(--ink-mute); font-size: 0.95rem; margin-top: 0.8rem; }
.footer-col h4 {
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 1rem;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}
.footer-col a { color: var(--ink-soft); font-size: 0.95rem; }
.footer-col a:hover { color: var(--brand-deep); }

.footer-bottom {
    padding-top: 1.5rem;
    color: var(--ink-faint);
    font-size: 0.85rem;
}
.footer-bottom p { margin: 0; color: var(--ink-faint); }

/* ====== Responsive ====== */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { order: -1; max-width: 520px; }
    .two-col { grid-template-columns: 1fr; gap: 2rem; }
    .service-block { grid-template-columns: 1fr; gap: 1rem; padding: 2.2rem 0; }
    .service-num { font-size: 2rem; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--paper-2);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.5rem 1.5rem;
        gap: 0.2rem;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }
    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-menu a { padding: 0.8rem 1rem; }
    .nav-cta { text-align: center; margin-top: 0.4rem; }
    .hero { padding: 3rem 0 4rem; }
    .section { padding: 3.5rem 0; }
    .cta-card { padding: 2rem; text-align: center; justify-content: center; }
}
