/* =====================================================
   common.css — Bridge-AI Locked Global Design
   Design: Premium monochrome / Autono-style
   No dark-light mode
   No old navbar/footer conflict
===================================================== */


/* ===== GLOBAL DESIGN TOKENS ===== */

:root {
    --bg-primary: #050505;
    --bg-secondary: #0b0b09;
    --bg-tertiary: #11110f;
    --text-primary: #f5f5f0;
    --text-secondary: rgba(245, 245, 240, 0.68);
    --text-muted: rgba(245, 245, 240, 0.42);
    --accent: #f5f5f0;
    --accent-dark: #d9d9d1;
    --accent-light: rgba(245, 245, 240, 0.08);
    --border: rgba(245, 245, 240, 0.14);
    --border-strong: rgba(245, 245, 240, 0.26);
    --success: #7fdc9b;
    --danger: #ff7777;
    --warning: #ffc46b;
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 18px 60px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 28px 100px rgba(0, 0, 0, 0.48);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 28px;
    --radius-pill: 999px;
    --nav-height: 82px;
    --container-width: 1480px;
    --transition: 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Inter", Arial, sans-serif;
}


/* ===== RESET ===== */

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

html {
    scroll-behavior: smooth;
    background: var(--bg-primary);
}

body {
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}


/* Keep fixed nav from overlapping normal pages */

main {
    position: relative;
    z-index: 1;
}


/* ===== TYPOGRAPHY ===== */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

h1 {
    font-size: clamp(58px, 11vw, 172px);
}

h2 {
    font-size: clamp(44px, 7vw, 112px);
}

h3 {
    font-size: clamp(30px, 4vw, 62px);
}

h4 {
    font-size: clamp(22px, 2.5vw, 34px);
}

p {
    color: var(--text-secondary);
    font-size: clamp(15px, 1.25vw, 18px);
    line-height: 1.75;
}

a {
    color: inherit;
    text-decoration: none;
}

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


/* ===== LAYOUT ===== */

.container {
    width: min(100%, var(--container-width));
    margin: 0 auto;
    padding: 0 clamp(18px, 4vw, 56px);
}

.section {
    position: relative;
    padding: clamp(72px, 10vw, 150px) 0;
    background: var(--bg-primary);
}

.section-sm {
    padding: clamp(48px, 7vw, 96px) 0;
}

.section-header {
    max-width: 980px;
    margin-bottom: clamp(42px, 6vw, 86px);
}

.section-header.text-center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-header h2 {
    margin-bottom: 22px;
}

.section-header p {
    max-width: 640px;
}

.section-header.text-center p {
    margin-left: auto;
    margin-right: auto;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.section-label::before {
    content: "";
    width: 42px;
    height: 1px;
    background: var(--text-muted);
}


/* ===== GRID HELPERS ===== */

.grid {
    display: grid;
    gap: clamp(18px, 2vw, 28px);
}

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

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gap-16 {
    gap: 16px;
}

.gap-24 {
    gap: 24px;
}


/* ===== BUTTONS ===== */

.btn {
    min-height: 48px;
    padding: 0 24px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: transparent;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.btn-secondary,
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.btn-secondary:hover,
.btn-outline:hover {
    transform: translateY(-3px);
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.btn-sm {
    min-height: 40px;
    padding: 0 18px;
    font-size: 10px;
}

.btn-lg {
    min-height: 56px;
    padding: 0 34px;
    font-size: 12px;
}


/* ===== CARDS ===== */

.card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.card-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.card-body {
    padding: clamp(22px, 2.5vw, 34px);
}

.card-title {
    margin-bottom: 12px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: clamp(22px, 2vw, 32px);
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.card-text {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.75;
}

.card-footer {
    padding: 18px clamp(22px, 2.5vw, 34px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* ===== BADGE / TAG ===== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}


/* ===== FORMS ===== */

.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    margin-bottom: 9px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    min-height: 54px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.065);
    border-color: var(--border-strong);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.055);
}

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


/* ===== PAGE HERO ===== */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: calc(var(--nav-height) + clamp(70px, 9vw, 130px)) 0 clamp(70px, 9vw, 120px);
    background: radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.08), transparent 28%), linear-gradient(180deg, #050505 0%, #0b0b09 100%);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.page-hero h1 {
    max-width: 1100px;
    margin: 0 auto 24px;
}

.page-hero p {
    max-width: 680px;
    margin: 0 auto;
    color: var(--text-secondary);
}


/* ===== MESSAGES ===== */

.messages {
    position: relative;
    z-index: 5;
    padding: 14px 0;
}

.message {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.055);
    color: var(--text-primary);
}

.message.success {
    border-color: rgba(127, 220, 155, 0.35);
    color: var(--success);
}

.message.error {
    border-color: rgba(255, 119, 119, 0.35);
    color: var(--danger);
}


/* ===== IMAGE PLACEHOLDER ===== */

.img-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)), var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 34px;
}

.stars {
    color: var(--text-primary);
    letter-spacing: 4px;
}


/* ===== SCROLL REVEAL COMMON UTILITY ===== */

[data-reveal] {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.8s var(--transition), transform 0.8s var(--transition);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ===== SCROLLBAR ===== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.38);
}


/* ===== UTILITIES ===== */

.text-center {
    text-align: center;
}

.text-accent {
    color: var(--text-primary);
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}


/* ===== RESPONSIVE ===== */

@media (max-width: 1100px) {
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .section-header {
        max-width: 760px;
    }
}

@media (max-width: 768px) {
     :root {
        --nav-height: 72px;
    }
    .section {
        padding: 72px 0;
    }
    .section-sm {
        padding: 50px 0;
    }
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    .section-header {
        margin-bottom: 42px;
    }
    .page-hero {
        padding: calc(var(--nav-height) + 56px) 0 64px;
    }
    .card-img {
        height: 210px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 18px;
    }
    h1 {
        font-size: clamp(48px, 17vw, 72px);
    }
    h2 {
        font-size: clamp(38px, 14vw, 58px);
    }
    .btn,
    .btn-lg {
        width: 100%;
    }
    .card-body {
        padding: 22px;
    }
    .card-footer {
        padding: 16px 22px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}