/* ==========================================================================
   CANARY THERMAL MANAGEMENT - CORE STYLESHEET
   Unified Styles for: index.html, monitoring.html, engineering.html, 
   services.html, and contact.html
   ========================================================================== */

/* 1. DESIGN TOKENS & PALETTE */
:root {
    --navy-dark: #0b192c;
    --navy-card: #132238;
    --bg-cream: #fbfaf8;
    --surface-white: #ffffff;
    --text-dark: #0b192c;
    --text-muted: #526071;
    --coral-accent: #ff7a59;
    --coral-hover: #e66646;
    --green-health: #10b981;
    --border-slate: #e2e8f0;
    --spacing-section: 5rem;
}

/* 2. BASE & WATERMARK LAYER FIX */
* {
    box-sizing: border-box;
}

html {
    background-color: var(--bg-cream);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: transparent; /* Allows watermark below to show cleanly */
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
    min-height: 100vh;
}

/* Watermark pseudo-element placed safely behind content */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/icon.png');
    background-repeat: no-repeat;
    background-position: center 20%;
    background-size: 750px;
    opacity: 0.25; /* Dial between 0.02 and 0.06 for subtlety */
    z-index: -1;
    pointer-events: none;
}

/* 3. TYPOGRAPHY */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    color: var(--navy-dark);
    margin-top: 0;
}

p {
    margin-top: 0;
    margin-bottom: 1.2rem;
}

/* Pill Badges */
.pill-badge {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    display: inline-block;
    font-weight: 700;
}

/* 4. HEADER & NAVIGATION */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 5%;
    background-color: var(--navy-dark);
    color: var(--bg-cream);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-desktop {
    height: 100px;
    width: auto;
    display: block;
}

.logo-mobile {
    height: 38px;
    width: auto;
    display: none;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: rgba(251, 250, 248, 0.85);
    font-weight: 600;
    margin: 0 1rem;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover,
nav a.active {
    color: var(--coral-accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 5. BUTTON STYLES */
.cta-button {
    display: inline-block;
    background-color: var(--coral-accent);
    color: var(--surface-white);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s, background-color 0.2s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--coral-hover);
    transform: translateY(-2px);
}

.cta-button-outline {
    display: inline-block;
    background-color: transparent;
    color: #ffffff;
    padding: 0.75rem 1.4rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.95rem;
}

.cta-button-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--coral-accent);
    color: var(--coral-accent);
}

/* 6. LAYOUT CONTAINERS & GRIDS */
.section-wrapper {
    padding: var(--spacing-section) 5%;
    max-width: 1250px;
    margin: 0 auto;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* 7. CONTENT & TELEMETRY CARDS */
.card {
    background-color: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-slate);
    border-radius: 12px;
    padding: 2.2rem;
    box-shadow: 0 10px 25px rgba(11, 25, 44, 0.03);
    backdrop-filter: blur(5px);
}

.telemetry-card {
    background-color: var(--navy-card);
    color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 8. FORMS (FOR CONTACT & AUDIT REQUESTS) */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--navy-dark);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-slate);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--surface-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--coral-accent);
    box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.15);
}

/* 9. FOOTER */
footer {
    background-color: var(--navy-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 5% 2rem 5%;
    margin-top: 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
    max-width: 1250px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

/* 10. RESPONSIVE BREAKPOINTS */
@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    nav { display: none; } /* Standard clean collapse for mobile */
    .logo-desktop { display: none; }
    .logo-mobile { display: block; }
}