/* ============================================================
   Velizar — site styles
   Minimal, Apple-inspired. System fonts, generous whitespace,
   restrained color: ink on white, one accent.
   ============================================================ */

:root {
    --bg: #ffffff;
    --bg-soft: #f5f5f7;
    --ink: #1d1d1f;
    --ink-soft: #6e6e73;
    --hairline: rgba(0, 0, 0, 0.08);
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --nav-h: 52px;
    --container: 1080px;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 12px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
        "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

::selection { background: rgba(0, 113, 227, 0.18); }

/* ---------- Navigation ---------- */

.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.nav.scrolled { border-bottom-color: var(--hairline); }

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.logo-mark { width: 23px; height: 23px; flex: 0 0 auto; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a:not(.btn) {
    font-size: 14px;
    color: var(--ink);
    opacity: 0.8;
    transition: opacity 0.2s var(--ease);
}

.nav-links a:not(.btn):hover { opacity: 1; }

.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    padding: 0 8px;
    background: none;
    border: 0;
    cursor: pointer;
}

.nav-burger span {
    display: block;
    height: 1.6px;
    width: 100%;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

body.nav-open .nav-burger span:nth-child(1) { transform: translateY(3.8px) rotate(45deg); }
body.nav-open .nav-burger span:nth-child(2) { transform: translateY(-3.8px) rotate(-45deg); }

/* ---------- Buttons & links ---------- */

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
    padding: 14px 28px;
    border: 0;
    border-radius: 980px;
    cursor: pointer;
    transition: background 0.2s var(--ease), transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.55; cursor: default; }

.btn-sm { font-size: 13px; padding: 9px 18px; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 17px;
    color: var(--accent);
}

.link-arrow svg { transition: transform 0.2s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

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

.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + 64px) 0 64px;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -20%;
    right: -15%;
    width: 720px;
    height: 720px;
    background: radial-gradient(closest-side, rgba(0, 113, 227, 0.10), rgba(125, 79, 255, 0.05) 55%, transparent 75%);
    filter: blur(20px);
    pointer-events: none;
}

.hero-inner { position: relative; }

.eyebrow {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 22px;
}

.hero-title {
    font-size: clamp(52px, 8.6vw, 96px);
    font-weight: 700;
    letter-spacing: -0.028em;
    line-height: 1.03;
    margin-bottom: 28px;
}

.grad {
    background: linear-gradient(92deg, #0071e3 5%, #7d4fff 60%, #b14fff 95%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-sub {
    font-size: clamp(19px, 2.4vw, 24px);
    line-height: 1.45;
    color: var(--ink-soft);
    max-width: 640px;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

/* ---------- Sections ---------- */

.section { padding: clamp(88px, 11vw, 140px) 0; }
.section-soft { background: var(--bg-soft); }

.section-head { max-width: 640px; margin-bottom: clamp(48px, 6vw, 72px); }

.section-head h2,
.contact-info h2 {
    font-size: clamp(34px, 4.6vw, 52px);
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.08;
    margin-bottom: 16px;
}

.section-head p {
    font-size: clamp(18px, 2vw, 21px);
    color: var(--ink-soft);
}

/* ---------- Principles strip ---------- */

.principles { padding: clamp(56px, 7vw, 96px) 0; border-top: 1px solid var(--hairline); }

.principles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(32px, 4vw, 56px);
}

.principle h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.principle p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

/* ---------- Service cards ---------- */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.07);
}

.card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-soft);
    border-radius: 12px;
    margin-bottom: 22px;
    color: var(--ink);
}

.card-icon svg { width: 24px; height: 24px; }

.card h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 10px; }
.card p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

/* ---------- Dark fintech section ---------- */

.section-dark {
    background: #000;
    color: #f5f5f7;
}

.section-dark .section-head p { color: rgba(245, 245, 247, 0.6); }

.dark-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.dark-cell {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-md);
    padding: 28px 26px;
    transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.dark-cell:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
}

.dark-cell h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.dark-cell p { font-size: 14px; line-height: 1.55; color: rgba(245, 245, 247, 0.62); }

/* ---------- Approach steps ---------- */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(28px, 3.5vw, 44px);
}

.step-num {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.04em;
    margin-bottom: 14px;
}

.step h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.step p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

/* ---------- Technology stack ---------- */

.stack-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stack-cell {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 34px 32px;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.stack-cell:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.07);
}

.stack-cell h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.stack-cell p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

.stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.stack-tags span {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    background: var(--bg-soft);
    border: 1px solid var(--hairline);
    border-radius: 980px;
    padding: 6px 14px;
}

/* ---------- Contact ---------- */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(40px, 6vw, 80px);
    align-items: start;
}

.contact-lead {
    font-size: 19px;
    color: var(--ink-soft);
    margin: 18px 0 32px;
}

.contact-points { list-style: none; }

.contact-points li {
    font-size: 16px;
    color: var(--ink-soft);
    padding: 14px 0;
    border-top: 1px solid var(--hairline);
}

.contact-points li:first-child a { font-size: 21px; font-weight: 600; }

.contact-form-wrap {
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    padding: clamp(28px, 4vw, 44px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field { margin-bottom: 16px; min-width: 0; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
    letter-spacing: 0.01em;
}

.field .opt { font-weight: 400; color: var(--ink-soft); }

.field input,
.field select,
.field textarea {
    width: 100%;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    outline: none;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14);
}

.field input::placeholder,
.field textarea::placeholder { color: #a1a1a6; }

.select-wrap { position: relative; }

.select-wrap select { padding-right: 40px; cursor: pointer; }

.select-chevron {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-soft);
    pointer-events: none;
}

.field-error {
    font-size: 13px;
    color: #d70015;
    margin-top: 6px;
    min-height: 0;
}

.field-error:empty { display: none; }

.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
}

.form-note { font-size: 12.5px; color: var(--ink-soft); max-width: 300px; }

.form-error-general { margin-top: 14px; }

.form-success { text-align: center; padding: clamp(24px, 4vw, 48px) 12px; }

.form-success-icon { width: 56px; height: 56px; margin: 0 auto 20px; }
.form-success-icon svg { width: 100%; height: 100%; }

.form-success h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 10px; }
.form-success p { font-size: 16px; color: var(--ink-soft); max-width: 380px; margin: 0 auto; }

/* ---------- Footer ---------- */

.footer {
    border-top: 1px solid var(--hairline);
    padding: 36px 0;
    background: var(--bg-soft);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.footer-logo svg { width: 18px; height: 18px; }

.footer p { font-size: 13px; color: var(--ink-soft); }
.footer a { color: var(--ink-soft); }
.footer a:hover { color: var(--ink); }

/* ---------- Reveal animations ----------
   Elements are only hidden when JS is running (html.js), so the site
   stays fully visible with JS disabled or broken. */

html.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

html.js .reveal.visible {
    opacity: 1;
    transform: none;
}

html.js .reveal.d1 { transition-delay: 0.08s; }
html.js .reveal.d2 { transition-delay: 0.16s; }
html.js .reveal.d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Admin ---------- */

.admin-body {
    background: var(--bg-soft);
    min-height: 100vh;
}

.admin-topbar {
    height: var(--nav-h);
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hairline);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-topbar-inner {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-wordmark { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.admin-wordmark span { color: var(--ink-soft); font-weight: 400; }

.btn-quiet {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    background: var(--bg-soft);
    border: 1px solid var(--hairline);
    border-radius: 980px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s var(--ease);
}

.btn-quiet:hover { background: #ececee; }

.admin-main { max-width: 880px; margin: 0 auto; padding: 40px 24px 80px; }

.admin-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.admin-head h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }

.count-chip {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--bg);
    border: 1px solid var(--hairline);
    border-radius: 980px;
    padding: 5px 13px;
}

.flash {
    font-size: 14px;
    background: #e8f2ff;
    color: #0a4a8f;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 18px;
}

.lead-card {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 24px 26px;
    margin-bottom: 14px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.lead-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.lead-name { font-size: 17px; font-weight: 600; }

.lead-date { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }

.lead-meta {
    font-size: 14px;
    color: var(--ink-soft);
    margin-bottom: 14px;
    display: flex;
    gap: 8px 18px;
    flex-wrap: wrap;
}

.lead-meta a { color: var(--accent); }

.lead-msg {
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    white-space: pre-line;
    overflow-wrap: anywhere;
    border-top: 1px solid var(--hairline);
    padding-top: 14px;
}

.lead-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.btn-danger {
    font-size: 13px;
    color: #d70015;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s var(--ease);
}

.btn-danger:hover { background: rgba(215, 0, 21, 0.08); }

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--ink-soft);
}

.empty-state h2 { font-size: 22px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }

/* Login */

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.login-card .admin-wordmark { display: inline-block; margin-bottom: 6px; }

.login-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 28px; }

.login-card .field { text-align: left; }

.login-card .field input { background: var(--bg-soft); }

.login-card .btn { width: 100%; margin-top: 8px; }

.login-note { font-size: 12.5px; color: var(--ink-soft); margin-top: 18px; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .cards-grid, .dark-grid, .stack-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }

    .nav-burger { display: flex; }

    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0; right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: rgba(255, 255, 255, 0.98);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        backdrop-filter: saturate(180%) blur(20px);
        border-bottom: 1px solid var(--hairline);
        box-shadow: 0 24px 40px rgba(0, 0, 0, 0.08);
        padding: 12px 24px 20px;
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
    }

    body.nav-open .nav-links {
        transform: none;
        opacity: 1;
        visibility: visible;
    }

    .nav-links li { width: 100%; }

    .nav-links a:not(.btn) {
        display: block;
        font-size: 17px;
        padding: 14px 0;
        border-bottom: 1px solid var(--hairline);
    }

    .nav-cta { padding-top: 16px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }

    .hero { min-height: 78vh; }

    .cards-grid, .dark-grid, .steps-grid, .principles-grid, .stack-grid { grid-template-columns: 1fr; }

    .form-row { grid-template-columns: 1fr; }

    .form-footer { flex-direction: column; align-items: stretch; text-align: center; }

    .form-note { max-width: none; }

    .btn { text-align: center; }

    .footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}
