/* Main stylesheet for onprem.company - Sovereign Open-Source Infrastructure */

:root {
    --primary: #212529;
    --secondary: #343a40;
    --accent: #991B1B;
    --light: #f8f9fa;
    --dark: #121212;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --gray: #6c757d;
    --gray-light: #f8f9fa;
    --gray-dark: #343a40;

    --brand-color: #991B1B;
    --brand-color-hover: #7F1D1D;
    --brand-color-light: #B91C1C;
    --light-body-color: #3d3b45e3;

    --body-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --heading-font: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    --transition-speed: 0.2s;
    --box-shadow: none;

    --page-padding-x: clamp(1.5rem, 5vw, 6rem);
    --text-padding-top: clamp(1rem, 2vw, 1.5rem);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background-color: rgba(244, 243, 242, 1);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--dark);
    background-color: rgba(244, 243, 242, 1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

main {
    flex: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

h2 {
    font-size: 1.6rem;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style-position: inside;
    margin-bottom: 1rem;
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

/* Section styling + scroll margin for fixed header */
section {
    padding: 0;
    margin: 0;
    scroll-margin-top: 90px;
}
section[id] {
    scroll-margin-top: 90px;
}

section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem auto;
}

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }
.pt-5 { padding-top: 3rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }
.pb-5 { padding-bottom: 3rem; }

/* Buttons */
.btn {
    display: inline-block;
    background-color: #111111;
    border: 1px solid #111111;
    color: white;
    padding: 0.75rem 1.4rem;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.btn:hover {
    background-color: var(--brand-color-hover);
    border-color: var(--brand-color-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #111111;
    color: #111111;
}

.btn-outline:hover {
    background-color: var(--brand-color);
    color: white;
}

/* Solutions / cards */
.solutions {
    background-color: #f8f9fa;
}

.solution-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.solution-card {
    background-color: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    height: 100%;
    transition: transform var(--transition-speed);
}

.solution-content {
    padding: 1.5rem;
}

.solution-content h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.tag {
    display: inline-block;
    background-color: #dfdfdf;
    color: #111111;
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* Security / feature items */
.security-item {
    background-color: #f8f9fa;
    padding: 2rem;
    border-left: 2px solid var(--brand-color);
    border-top: 1px solid #d5d5d5;
    border-bottom: 1px solid #d5d5d5;
    transition: border-color var(--transition-speed);
}

.security-item:hover {
    border-color: #ab2a2a;
}

.security-item h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Four column grid */
.four-col-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.4rem;
}

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

@media (max-width: 768px) {
    .four-col-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --page-padding-x: clamp(1.5rem, 4vw, 2rem);
    }
}

@media (min-width: 769px) {
    :root {
        --page-padding-x: clamp(3rem, 8vw, 200px);
    }
}

@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
    section { padding: 3rem 0; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
}

@media (max-width: 576px) {
    .container { width: 95%; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
}
