/* =========================================================
   Rubicon Computing Solutions — site styles
   Theme: Roman heritage meets modern technology
   ========================================================= */

:root {
    --ink: #15131a;
    --ink-soft: #201d26;
    --slate: #243340;
    --marble: #f7f3ec;
    --marble-deep: #efe8db;
    --crimson: #8e2030;
    --crimson-bright: #b03044;
    --gold: #c9a227;
    --gold-light: #e3c565;
    --river: #3d6e82;
    --river-deep: #2a505f;
    --text-dark: #2b2730;
    --text-light: #e9e4da;
    --text-muted-light: #b3aca0;
    --font-display: "Cinzel", "Times New Roman", serif;
    --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text-dark);
    background: var(--marble);
}

img, svg {
    max-width: 100%;
}

a {
    color: var(--crimson);
}

/* ---------- Header / navigation ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(21, 19, 26, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(201, 162, 39, 0.35);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--gold);
}

.brand-mark {
    width: 2.4rem;
    height: 2.4rem;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--marble);
}

.brand-sub {
    font-size: 0.68rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold);
}

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

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover {
    color: var(--gold-light);
    border-bottom-color: var(--gold);
}

.nav-links .nav-cta {
    border: 1px solid var(--gold);
    border-radius: 2px;
    padding: 0.45rem 1.1rem;
    color: var(--gold-light);
}

.nav-links .nav-cta:hover {
    background: var(--gold);
    color: var(--ink);
    border-bottom-color: var(--gold);
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    background: var(--gold);
    transition: transform 0.2s, opacity 0.2s;
}

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

.hero {
    position: relative;
    background:
        radial-gradient(1100px 500px at 75% -10%, rgba(142, 32, 48, 0.45), transparent 65%),
        radial-gradient(800px 400px at 10% 110%, rgba(61, 110, 130, 0.25), transparent 60%),
        linear-gradient(160deg, var(--ink) 0%, var(--ink-soft) 60%, #1b2229 100%);
    color: var(--text-light);
    padding: 7rem 1.25rem 0;
    overflow: hidden;
}

.hero-inner {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
    padding-bottom: 6rem;
}

.eyebrow {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 1.5rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    line-height: 1.12;
    margin: 0 0 1.5rem;
    color: var(--marble);
}

.hero h1 .accent {
    color: var(--gold-light);
}

.hero-lede {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-muted-light);
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-river {
    line-height: 0;
}

.hero-river svg {
    width: 100%;
    height: 120px;
    display: block;
}

.river-back {
    fill: var(--river-deep);
    opacity: 0.55;
}

.river-front {
    fill: var(--slate);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.85rem 2rem;
    border-radius: 2px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--crimson);
    color: #fff;
    border-color: var(--crimson-bright);
}

.btn-primary:hover {
    background: var(--crimson-bright);
}

.btn-ghost {
    background: transparent;
    color: var(--gold-light);
    border-color: var(--gold);
}

.btn-ghost:hover {
    background: rgba(201, 162, 39, 0.12);
}

/* ---------- Legacy strip ---------- */

.legacy {
    background: var(--slate);
    color: var(--text-light);
    padding: 3.5rem 1.25rem 4rem;
}

.legacy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    text-align: center;
}

.legacy-figure {
    display: block;
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
}

.legacy-item p {
    margin: 0;
    color: var(--text-muted-light);
    font-size: 0.98rem;
}

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

.section {
    padding: 5.5rem 1.25rem;
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-light {
    background:
        radial-gradient(900px 300px at 90% 0%, rgba(201, 162, 39, 0.08), transparent 60%),
        var(--marble);
    color: var(--text-dark);
}

.section-dark {
    background:
        radial-gradient(900px 400px at 10% 0%, rgba(142, 32, 48, 0.25), transparent 60%),
        var(--ink);
    color: var(--text-light);
}

.section-numeral {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.5em;
    color: var(--gold);
    margin: 0 0 0.25rem;
}

.section-numeral::after {
    content: "";
    display: block;
    width: 64px;
    height: 2px;
    background: var(--gold);
    margin-top: 0.6rem;
}

.section h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.7rem, 3.6vw, 2.5rem);
    margin: 0.75rem 0 1rem;
}

.section-light h2 {
    color: var(--crimson);
}

.section-dark h2 {
    color: var(--marble);
}

.section-lede {
    font-size: 1.15rem;
    max-width: 720px;
    margin: 0 0 3rem;
}

.section-dark .section-lede {
    color: var(--text-muted-light);
}

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

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.card {
    background: #fff;
    border: 1px solid var(--marble-deep);
    border-top: 3px solid var(--gold);
    border-radius: 3px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 1px 3px rgba(21, 19, 26, 0.07);
    transition: transform 0.2s, box-shadow 0.2s, border-top-color 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(21, 19, 26, 0.12);
    border-top-color: var(--crimson);
}

.card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 0.65rem;
}

.card p {
    margin: 0;
    font-size: 0.98rem;
    color: #4d4756;
}

/* ---------- Technologies ---------- */

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

.tech-group h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-light);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(201, 162, 39, 0.35);
}

.chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.chips li {
    background: rgba(247, 243, 236, 0.06);
    border: 1px solid rgba(227, 197, 101, 0.4);
    color: var(--text-light);
    border-radius: 2px;
    padding: 0.45rem 0.95rem;
    font-size: 0.95rem;
    font-weight: 600;
}

/* ---------- Clients ---------- */

.client-wall {
    list-style: none;
    margin: 0 0 2.25rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.client-wall li {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--marble-deep);
    border-radius: 3px;
    padding: 1.4rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 5rem;
    box-shadow: 0 1px 3px rgba(21, 19, 26, 0.06);
}

.client-note {
    max-width: 720px;
    color: #5a5363;
    font-style: italic;
    margin: 0;
}

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

.section-contact .section-lede {
    margin-bottom: 2.25rem;
}

.contact-form {
    max-width: 720px;
    background: rgba(247, 243, 236, 0.04);
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 3px;
    padding: 2rem;
}

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

.form-field {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 0.4rem;
}

.form-field input,
.form-field textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-light);
    background: rgba(21, 19, 26, 0.6);
    border: 1px solid rgba(179, 172, 160, 0.4);
    border-radius: 2px;
    padding: 0.7rem 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(179, 172, 160, 0.55);
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.2);
}

.form-field textarea {
    resize: vertical;
    min-height: 8rem;
}

.field-error {
    color: #f0a5ae;
    font-size: 0.85rem;
    margin-top: 0.35rem;
    min-height: 1em;
}

.validation-summary ul {
    color: #f0a5ae;
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.form-banner {
    max-width: 720px;
    border-radius: 3px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 1.02rem;
}

.form-banner-success {
    background: rgba(46, 125, 80, 0.18);
    border: 1px solid #3f9d6a;
    color: #bfe8cf;
}

.form-banner-error {
    background: rgba(176, 48, 68, 0.2);
    border: 1px solid var(--crimson-bright);
    color: #f3c2ca;
}

.btn-submit {
    width: 100%;
    margin-top: 0.5rem;
}

.contact-direct {
    text-align: center;
    margin: 1.25rem 0 0;
    color: var(--text-muted-light);
    font-size: 0.95rem;
}

.contact-direct a {
    color: var(--gold-light);
}

/* Honeypot — visually removed, still in DOM for bots */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

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

.site-footer {
    background: #0e0c12;
    color: var(--text-muted-light);
    border-top: 1px solid rgba(201, 162, 39, 0.35);
    padding: 2.25rem 1.25rem;
    text-align: center;
    font-size: 0.92rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-motto {
    font-family: var(--font-display);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--gold);
    margin: 0 0 0.6rem;
}

.footer-motto em {
    text-transform: none;
    letter-spacing: 0.04em;
    color: var(--text-muted-light);
}

.site-footer a {
    color: var(--gold-light);
}

/* ---------- Scroll reveal (JS-gated so no-JS users see everything) ---------- */

html.js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

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

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

@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .client-wall {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--ink);
        border-bottom: 1px solid rgba(201, 162, 39, 0.35);
        padding: 0.5rem 1.25rem 1rem;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 0.8rem 0;
        border-bottom: 0;
    }

    .nav-links .nav-cta {
        margin-top: 0.5rem;
    }

    .hero {
        padding-top: 4.5rem;
    }

    .legacy-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .card-grid,
    .tech-groups {
        grid-template-columns: 1fr;
    }

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

    .section {
        padding: 3.75rem 1.25rem;
    }

    .contact-form {
        padding: 1.4rem 1.1rem;
    }
}
