/* ==========================================================================
   Nonus Limited — business card website
   Flat, modern design with automatic dark mode (prefers-color-scheme).
   ========================================================================== */

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

/* Design tokens */
:root {
    --bg: #f6f7f9;
    --card: #ffffff;
    --text: #1f2937;            /* gray-800 */
    --text-muted: #6b7280;      /* gray-500 */
    --border: #e5e7eb;          /* gray-200 */
    --accent: #1d4ed8;          /* blue-700 */
    --accent-hover: #1e3a8a;    /* blue-900 */
    --accent-soft: #eff4ff;
    --danger: #dc2626;
    --success: #059669;

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

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

    --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.07);
    --shadow-hover: 0 6px 20px rgba(15, 23, 42, 0.1);

    --transition-fast: 150ms ease;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1120;
        --card: #111827;        /* gray-900 */
        --text: #e5e7eb;        /* gray-200 */
        --text-muted: #9ca3af;  /* gray-400 */
        --border: #243044;
        --accent: #60a5fa;      /* blue-400 */
        --accent-hover: #93c5fd;/* blue-300 */
        --accent-soft: #16223c;
        --danger: #f87171;
        --success: #34d399;

        --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.5);
        --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.55);
    }
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(0.75rem, 3vw, 2.5rem);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: clamp(1.25rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 5vw, 3rem);
}

/* ---- Hero ---- */
.hero {
    text-align: center;
}

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(1.9rem, 5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.hero-role {
    margin-top: 0.5rem;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 500;
    color: var(--text-muted);
}

.hero-meta {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-meta a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.hero-meta a:hover {
    text-decoration: underline;
}

/* ---- Services ---- */
.services h2,
.contact h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
}

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

.service-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: var(--transition-fast);
}

.service-card:hover {
    box-shadow: var(--shadow-hover);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.service-icon svg {
    width: 22px;
    height: 22px;
}

.service-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.service-card ul {
    list-style: none;
}

.service-card li {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 0.2rem 0 0.2rem 1rem;
    position: relative;
}

.service-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

/* ---- Contact form ---- */
.contact-intro {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: -0.75rem 0 1.5rem;
}

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

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.required-mark {
    color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--card);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

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

/* Field validation errors */
.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
    border-color: var(--danger);
}

.form-input.is-invalid:focus,
.form-select.is-invalid:focus,
.form-textarea.is-invalid:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 15%, transparent);
}

.form-error {
    display: none;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--danger);
}

.form-error:not(:empty) {
    display: block;
}

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

.form-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.5rem;
}

/* Captcha */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.captcha-row img {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    max-width: 100%;
    height: auto;
}

.captcha-reload {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.captcha-reload:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.captcha-reload svg {
    width: 18px;
    height: 18px;
}

.captcha-answer {
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* Submit button */
.form-submit-btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: var(--accent);
    color: var(--card);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
}

.form-submit-btn:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.form-submit-btn:active {
    transform: translateY(0);
}

.form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-submit-btn .btn-loader {
    display: none;
}

.form-submit-btn.is-loading .btn-text {
    display: none;
}

.form-submit-btn.is-loading .btn-loader {
    display: inline;
}

/* Status messages */
.form-status:empty {
    display: none;
}

.form-status {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    text-align: center;
}

.form-status-success {
    background: color-mix(in srgb, var(--success) 12%, transparent);
    border: 1px solid var(--success);
    color: var(--success);
}

.form-status-error {
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    border: 1px solid var(--danger);
    color: var(--danger);
}

/* Office location */
.office-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.office-location svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ---- Footer ---- */
.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-linkedin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.footer-linkedin:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.footer-linkedin svg {
    width: 16px;
    height: 16px;
}

/* Honeypot (must stay hidden from humans) */
.honeypot-field {
    display: none !important;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .services-grid,
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Print */
@media print {
    body {
        background: #fff;
    }

    .contact,
    .footer {
        display: none;
    }

    .card {
        border: none;
        box-shadow: none;
    }
}
