/* =========================================
   1. VARIABLES & THEME SETUP
   Based on HyMaTrace Design System V2.0
   ========================================= */
:root {
    /* Brand Colors */
    --hmt-mint-primary: #1C3557;       /* Power Navy - Main Action */
    --hmt-mint-hover:   #142841;       /* Deep Navy - Hover States */
    --hmt-mint-light:   #E1E7EF;       /* Steel Light - Badges/Backgrounds */
    --hmt-mint-subtle:  #F2F5F9;       /* Porcelain - Trust Signals */
    --hmt-accent:       #C27B2A;       /* Copper - Highlights */

    /* Functional Colors */
    --hmt-warning:      #C27B2A;       /* Copper - Warnings/Hints */
    --hmt-warning-bg:   #FFF4E5;
    --hmt-error:        #C9413A;       /* Signal Red - Destructive */

    /* Typography & UI Colors */
    --hmt-text-dark:    #0F172A;       /* Headings */
    --hmt-text-body:    #1F2937;       /* Body Text */
    --hmt-text-muted:   #667085;       /* Meta Info */
    --hmt-bg-body:      #F3F4F6;       /* Page Background */
    --hmt-bg-soft:      #EEF2F6;       /* Section Backgrounds */
    --hmt-border:       #D5DDE7;       /* Borders */

    /* Spacing & Layout */
    --hmt-radius-sm:    8px;
    --hmt-radius-md:    12px;
    --hmt-radius-lg:    16px;
    --hmt-shadow-sm:    0 6px 16px rgba(15, 23, 42, 0.08);
    --hmt-shadow-md:    0 16px 36px rgba(15, 23, 42, 0.12);
    --hmt-shadow-hover: 0 20px 44px rgba(28, 53, 87, 0.2);
}

/* =========================================
   2. GLOBAL RESETS & TYPOGRAPHY
   ========================================= */
body {
    background-color: var(--hmt-bg-body);
    color: var(--hmt-text-body);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--hmt-text-dark);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--hmt-mint-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--hmt-mint-hover);
}

.text-mint,
.text-brand {
    color: var(--hmt-mint-primary) !important;
}

.bg-mint {
    background-color: var(--hmt-mint-primary) !important;
    color: #ffffff !important;
}

.bg-mint-subtle {
    background-color: var(--hmt-mint-subtle) !important;
}

.badge-brand {
    background-color: var(--hmt-mint-light);
    color: var(--hmt-mint-hover);
    border: 1px solid rgba(28, 53, 87, 0.15);
    letter-spacing: 0.04em;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: var(--hmt-mint-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(28, 53, 87, 0.25);
}

/* =========================================
   3. COMPONENT: BUTTONS
   Standardized Button System
   ========================================= */
.btn-brand-primary {
    background-color: var(--hmt-mint-primary);
    border: 2px solid var(--hmt-mint-primary);
    color: #ffffff !important;
    font-weight: 600;
    border-radius: var(--hmt-radius-sm);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-brand-primary:hover,
.btn-brand-primary:focus {
    background-color: var(--hmt-mint-hover);
    border-color: var(--hmt-mint-hover);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(28, 53, 87, 0.25);
}

.btn-brand-secondary {
    background-color: transparent;
    border: 2px solid rgba(28, 53, 87, 0.7);
    color: var(--hmt-mint-primary) !important;
    font-weight: 500;
    border-radius: var(--hmt-radius-sm);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-brand-secondary:hover {
    border-color: var(--hmt-mint-hover);
    color: var(--hmt-mint-hover) !important;
    background-color: #ffffff;
}

.btn-brand-big-primary {
    background-color: var(--hmt-mint-primary);
    border: 2px solid var(--hmt-mint-primary);
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: var(--hmt-radius-sm);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-brand-big-primary:hover,
.btn-brand-big-primary:focus {
    background-color: var(--hmt-mint-hover);
    border-color: var(--hmt-mint-hover);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(28, 53, 87, 0.25);
}

.btn-brand-big-secondary {
    background-color: transparent;
    border: 2px solid rgba(28, 53, 87, 0.7);
    color: var(--hmt-mint-primary) !important;
    font-weight: 500;
    padding: 0.75rem 1.75rem;
    border-radius: var(--hmt-radius-sm);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-brand-big-secondary:hover {
    border-color: var(--hmt-mint-hover);
    color: var(--hmt-mint-hover) !important;
    background-color: #ffffff;
}

/* =========================================
   4. COMPONENT: CARDS & CONTAINERS
   Generic card styles for Hero, Content, Forms
   ========================================= */
.card-brand {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.03); /* Subtle border */
    border-radius: var(--hmt-radius-lg);
    box-shadow: var(--hmt-shadow-md);
    padding: 2rem;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-brand-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--hmt-shadow-hover);
    border-color: var(--hmt-mint-primary);
}

/* For forms inside cards */
.card-brand-form {
    padding: 2.5rem;
}

/* =========================================
    5. COMPONENT: FORMS
    Standardized Inputs across Demo Workflows
    ========================================= */
.form-control-brand, 
.form-select-brand {
    padding: 0.85rem 1rem;
    border-radius: var(--hmt-radius-sm);
    border: 1px solid var(--hmt-border);
    color: var(--hmt-text-dark);
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control-brand:focus, 
.form-select-brand:focus {
    border-color: var(--hmt-mint-primary);
    box-shadow: 0 0 0 4px rgba(28, 53, 87, 0.12);
    outline: none;
}

.form-label-brand {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--hmt-text-dark);
    margin-bottom: 0.5rem;
    display: block;
}

/* Checkbox grids keep multi-selects aligned and off the submit buttons */
.checkbox-grid {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checkbox-grid:not(input) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem 1rem;
}

.checkbox-grid:not(input) > div {
    margin: 0;
}

.checkbox-grid label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border: 1px solid var(--hmt-border);
    border-radius: var(--hmt-radius-sm);
    box-shadow: var(--hmt-shadow-sm);
}

.checkbox-grid label input[type="checkbox"],
input.checkbox-grid[type="checkbox"] {
    margin: 0;
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

/* =========================================
   6. COMPONENT: BADGES & ICONS
   Trust signals, Steps, Status
   ========================================= */
/* Trust Badge (e.g. "Analyse complete") */
.badge-trust {
    background-color: var(--hmt-mint-subtle);
    color: var(--hmt-mint-hover);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Icon Box (Square container for icons) */
.icon-box-brand {
    width: 48px;
    height: 48px;
    background-color: var(--hmt-mint-light);
    color: var(--hmt-mint-primary);
    border-radius: var(--hmt-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.facility-meta-line {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--hmt-text-muted);
    font-size: 0.9rem;
}

.facility-meta-icon {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--hmt-mint-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Step Lists (1. Analyse, 2. Solution...) */
.step-list-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.step-circle {
    width: 32px;
    height: 32px;
    background-color: var(--hmt-mint-light);
    color: var(--hmt-mint-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.log-check-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--hmt-mint-primary);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(28, 53, 87, 0.3);
}

/* =========================================
   7. UTILITIES & SECTIONS
   ========================================= */
.section-hero {
    padding: 4rem 0 5rem;
    background: linear-gradient(140deg, #ffffff 0%, var(--hmt-bg-soft) 45%, #dde5ef 100%);
}

.text-brand-subline {
    font-size: 1.1rem;
    color: var(--hmt-text-muted);
    line-height: 1.6;
}

/* Warning/Hint Box (e.g. for lead nudges) */
.box-hint {
    background-color: #ffffff;
    border-left: 4px solid var(--hmt-warning);
    border-radius: var(--hmt-radius-sm);
    padding: 1.25rem;
    box-shadow: var(--hmt-shadow-sm);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.box-hint-icon {
    color: var(--hmt-warning);
}

.box-hint a {
    color: var(--hmt-warning);
    text-decoration: underline;
    font-weight: 600;
}

/* =========================================
    8. COMPONENT: DEMO ELEMENTS
    ========================================= */
.card-hero-glow {
    background: radial-gradient(circle at 20% 20%, rgba(28, 53, 87, 0.14), rgba(28, 53, 87, 0.02));
}

.stat-tile {
    background: var(--hmt-bg-soft);
    border: 1px solid var(--hmt-border);
    border-radius: var(--hmt-radius-md);
    padding: 1rem;
    height: 100%;
}

.score-pill {
    border-radius: var(--hmt-radius-md);
    padding: 1rem 1.25rem;
    font-weight: 700;
    min-width: 220px;
    text-align: center;
}

.score-pill-critical {
    background: #fee2e2;
    color: #7f1d1d;
}

.score-pill-warning {
    background: #fff4e5;
    color: #9a3412;
}

.score-pill-strong {
    background: var(--hmt-mint-primary);
    color: #ffffff;
}

.alert-brand-success {
    background: var(--hmt-mint-subtle);
    border-color: var(--hmt-mint-light);
    color: var(--hmt-mint-hover);
}

.cursor-pointer {
    cursor: pointer;
}
