:root {
    --brand-main: #25a9e0;
    --brand-dark: #1b8cb8;
    --brand-light: #e0f2fe;
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --text-high: #0f172a;
    --text-med: #475569;
    --border-subtle: rgba(15, 23, 42, 0.08);
    --border-focus: rgba(37, 169, 224, 0.3);
    --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.02);
    --shadow-hover: 0 20px 40px -15px rgba(37, 169, 224, 0.15), 0 10px 20px -10px rgba(15, 23, 42, 0.04);
    --rad-lg: 24px;
    --rad-md: 14px;
    --rad-sm: 8px;
    --trans-swift: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-high);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--header-height);
}

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

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

main { display: block; }

section { scroll-margin-top: calc(var(--header-height) + 16px); }

.container {
    width: 92%;
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px auto;
}

.sub-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-main);
    display: block;
    margin-bottom: 8px;
}

.section-header h2 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.15rem;
    color: var(--text-med);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--rad-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--trans-swift);
    border: none;
}

.btn-primary {
    background: var(--brand-main);
    color: white;
    box-shadow: 0 8px 20px rgba(37, 169, 224, 0.25);
}

.btn-primary:hover {
    background: var(--brand-dark);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(37, 169, 224, 0.35);
}

.btn-outline-premium {
    background: var(--bg-surface);
    color: var(--text-high);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
}

.btn-outline-premium:hover {
    border-color: var(--brand-main);
    color: var(--brand-main);
    transform: translateY(-3px);
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-ghost { background: transparent; color: var(--text-med); border: none; box-shadow: none; font-weight: 600; padding: 8px 16px; }
.btn-ghost:hover { background: rgba(15, 23, 42, 0.05); color: var(--text-high); }
.w-100 { width: 100%; }

/* --- Artistic Upgrades --- */
.hero-section {
    position: relative;
    background: radial-gradient(circle at 50% -20%, rgba(37, 169, 224, 0.15), transparent 70%), var(--bg-page);
}
.hero-section::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h40v40H0z" fill="none"/><circle cx="20" cy="20" r="1" fill="rgba(37,169,224,0.1)"/></svg>');
    pointer-events: none; z-index: 0;
}
.section-header h2 {
    color: var(--text-high);
}

/* Glassmorphism Cards */
.glass-card, .service-card, .product-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-card);
    transition: var(--trans-swift);
}

/* --- Estimator Wizard UI --- */
.estimator-wizard {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--rad-lg);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.estimator-step {
    padding: 30px;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.estimator-step[hidden] {
    display: none !important;
}

.step-header { margin-bottom: 40px; text-align: center; }
.step-header h3 { font-size: 2rem; margin-bottom: 12px; }
.step-header p { color: var(--text-med); font-size: 1.1rem; }

.medium-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.medium-tile {
    border: 2px solid var(--border-subtle);
    border-radius: var(--rad-lg);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--trans-swift);
    background: var(--bg-page);
    position: relative;
}

.medium-tile input[type="checkbox"] {
    position: absolute; top: 20px; right: 20px;
    width: 24px; height: 24px;
    accent-color: var(--brand-main);
    cursor: pointer;
}

.medium-tile-icon {
    font-size: 2rem; color: var(--text-med); margin-bottom: 12px; transition: var(--trans-swift);
}

.medium-tile h4 { font-size: 1.1rem; margin-bottom: 6px; }
.medium-tile .medium-meta { font-size: 0.9rem; color: var(--brand-main); font-weight: 600; }

.medium-tile:hover { border-color: var(--border-focus); transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.medium-tile.active {
    border-color: var(--brand-main);
    background: rgba(37, 169, 224, 0.04);
}
.medium-tile.active .medium-tile-icon { color: var(--brand-main); }

.step-actions {
    display: flex; justify-content: flex-end; padding-top: 24px; border-top: 1px solid var(--border-subtle);
}
.step-actions.split { justify-content: space-between; align-items: center; }

/* Step 2 Two-Pane */
.estimator-two-pane {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
}

.estimator-features-panel {
    background: var(--bg-page);
    border-radius: var(--rad-md);
    padding: 24px;
    border: 1px solid var(--border-subtle);
}

.features-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border-subtle);
}

.features-header h4 { font-size: 1.2rem; }
.feature-count { background: var(--brand-main); color: white; padding: 4px 12px; border-radius: 20px; font-weight: 700; font-size: 0.9rem; }

.feature-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.feature-list li { display: flex; gap: 16px; align-items: flex-start; }
.feature-check { color: var(--brand-main); margin-top: 4px; font-size: 1.1rem; }
.feature-list li strong { display: block; font-size: 0.95rem; color: var(--text-high); }
.feature-list li p { font-size: 0.85rem; color: var(--text-med); margin-top: 4px; line-height: 1.4; }
.empty-features { color: var(--text-med); font-style: italic; }

.estimator-config-panel { display: flex; flex-direction: column; gap: 24px; }

.control-group { background: var(--bg-page); padding: 20px; border-radius: var(--rad-md); border: 1px solid var(--border-subtle); }
.group-title-row { margin-bottom: 16px; font-weight: 700; font-size: 1.1rem; color: var(--brand-dark); border-bottom: 1px solid var(--border-subtle); padding-bottom: 12px; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.tile-option {
    border: 2px solid var(--border-subtle); border-radius: var(--rad-md); padding: 16px 12px;
    display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: var(--trans-swift);
    background: var(--bg-surface); text-align: center;
}
.tile-option input { display: none; }
.tile-option i { font-size: 1.4rem; color: var(--text-med); }
.tile-option span { font-weight: 700; font-size: 0.9rem; }
.tile-option small { color: var(--brand-main); font-weight: 600; font-size: 0.85rem; }

.tile-option.active { border-color: var(--brand-main); background: rgba(37, 169, 224, 0.04); box-shadow: 0 0 0 1px var(--brand-main); }
.tile-option.active i { color: var(--brand-main); }

.estimator-summary-panel {
    background: var(--text-high); color: white; padding: 30px; border-radius: var(--rad-md);
}
.estimator-summary-panel h3 { border-bottom: 1px solid #334155; padding-bottom: 16px; margin-bottom: 24px; }
.breakdown-row { display: flex; justify-content: space-between; margin-bottom: 12px; color: #cbd5e1; }
.panel-divider { border-top: 1px dashed #475569; margin: 24px 0; border-bottom: none; border-left: none; border-right: none;}
.total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.total-row span:first-child { font-size: 1.1rem; color: white; }
#calculated-total-cost { font-size: 2rem; font-weight: 800; color: var(--brand-main); }
.panel-note { font-size: 0.85rem; color: #94a3b8; margin-bottom: 24px; }

@media (max-width: 900px) {
    .estimator-two-pane { grid-template-columns: 1fr; }
    .estimator-step { padding: 30px 20px; }
}

/* =====================================================
   SHARED PAGE HERO — Used by all inner pages
   ===================================================== */
.page-hero {
    position: relative;
    overflow: visible;
    padding: 72px 0 64px;
    background: #ffffff;
    border-bottom: 1px solid rgba(37, 169, 224, 0.12);
}

/* Clip only the pseudo-element blobs, not the text */
.page-hero > *:not(.page-hero::before):not(.page-hero::after) {
    position: relative;
}

/* Prevent gradient text from being clipped */
.page-hero h1 {
    padding-bottom: 6px;
    overflow: visible;
    line-height: 1.18;
}

/* Colorful static gradient blobs — background decoration */
.page-hero::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    top: -200px; right: -100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 169, 224, 0.14) 0%, rgba(99, 102, 241, 0.08) 50%, transparent 70%);
    pointer-events: none;
}

.page-hero::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    bottom: -150px; left: -80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.10) 0%, rgba(37, 169, 224, 0.06) 50%, transparent 70%);
    pointer-events: none;
}

/* Dotted grid texture */
.page-hero-inner {
    position: relative;
    z-index: 2;
}

/* Eyebrow label */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-main);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.hero-eyebrow i { font-size: 0.9rem; }

/* Main hero title */
.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin-bottom: 18px;
    color: var(--text-high);
}

/* Hero subtitle */
.page-hero p {
    font-size: 1.1rem;
    color: var(--text-med);
    max-width: 620px;
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 700px) {
    .page-hero { padding: 60px 0 48px; }
    .page-hero h1 { font-size: 2rem; }
    .page-hero p { font-size: 1rem; }
}

/* =====================================================
   CEO PROFILE & LEADERSHIP HEADER STYLING
   ===================================================== */
.ceo-leadership-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(37, 169, 224, 0.12);
    padding: 48px 0;
    position: relative;
}
.ceo-leadership-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
}
.leadership-title-block {
    flex: 1;
}
.leadership-title-block h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    color: var(--text-high);
}
.leadership-title-block p {
    font-size: 1.05rem;
    color: var(--text-med);
    max-width: 480px;
    line-height: 1.6;
}

/* CEO Card */
.ceo-profile-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(37, 169, 224, 0.15);
    border-radius: var(--rad-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    max-width: 580px;
    flex: 1.2;
    transition: var(--trans-swift);
}
.ceo-profile-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(37, 169, 224, 0.3);
}
.ceo-image-wrapper {
    width: 130px;
    height: 130px;
    border-radius: var(--rad-md);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(37, 169, 224, 0.1);
}
.ceo-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ceo-text-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ceo-text-details h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-high);
}
.ceo-tag {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 800;
    color: white;
    background: var(--brand-main);
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ceo-text-details p {
    font-size: 0.88rem;
    color: var(--text-med);
    line-height: 1.5;
}

/* Homepage specific CEO block */
.homepage-ceo-container .ceo-profile-card {
    max-width: 720px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .ceo-leadership-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 32px;
    }
    .ceo-profile-card {
        max-width: 100%;
    }
}
@media (max-width: 480px) {
    .ceo-profile-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .ceo-tag {
        align-self: center;
    }
}

/* =====================================================
   CEO HERO SECTION (No extra boxes, large typography)
   ===================================================== */
.ceo-hero-section {
    background: radial-gradient(circle at 10% 20%, rgba(37, 169, 224, 0.08) 0%, transparent 60%), #ffffff;
    border-bottom: 1px solid rgba(37, 169, 224, 0.12);
    padding: 80px 0 64px 0;
    position: relative;
}
.ceo-hero-flex {
    display: flex;
    align-items: center;
    gap: 60px;
}
.ceo-hero-image-wrapper {
    width: 280px;
    height: 280px;
    border-radius: 40px;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid #ffffff;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(37, 169, 224, 0.15);
}
.ceo-hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ceo-hero-text {
    flex: 1;
}
.ceo-hero-text h1 {
    font-size: clamp(2.8rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    color: var(--text-high);
    line-height: 1.1;
}
.ceo-hero-designation {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--brand-main);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}
.ceo-hero-bio {
    font-size: 1.25rem;
    color: var(--text-med);
    line-height: 1.7;
    max-width: 780px;
}

@media (max-width: 992px) {
    .ceo-hero-flex {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    .ceo-hero-image-wrapper {
        width: 220px;
        height: 220px;
        border-radius: 30px;
    }
    .ceo-hero-bio {
        margin: 0 auto;
    }
}

/* =====================================================
   D1 ESTIMATOR PLATFORM SELECTION OVERRIDES (Mobile)
   ===================================================== */
@media (max-width: 480px) {
    .medium-selection-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 24px !important;
    }
    .medium-tile {
        padding: 14px 10px !important;
        border-radius: var(--rad-md) !important;
    }
    .medium-tile input[type="checkbox"] {
        top: 10px !important;
        right: 10px !important;
        width: 16px !important;
        height: 16px !important;
    }
    .medium-tile-icon {
        font-size: 1.4rem !important;
        margin-bottom: 8px !important;
    }
    .medium-tile h4 {
        font-size: 0.85rem !important;
        margin-bottom: 4px !important;
        line-height: 1.2;
    }
    .medium-tile .medium-meta {
        font-size: 0.75rem !important;
    }
}

/* =====================================================
   VERSATILE TILE DESIGN FOR LEADERSHIP GALLERY
   ===================================================== */
.masonry-item:nth-child(4n+1),
.leadership-item:nth-child(4n+1) {
    aspect-ratio: 4 / 3 !important;
}
.masonry-item:nth-child(4n+2),
.leadership-item:nth-child(4n+2) {
    aspect-ratio: 3 / 4 !important;
}
.masonry-item:nth-child(4n+3),
.leadership-item:nth-child(4n+3) {
    aspect-ratio: 1 / 1 !important;
}
.masonry-item:nth-child(4n+4),
.leadership-item:nth-child(4n+4) {
    aspect-ratio: 3 / 2 !important;
}

.masonry-image,
.leadership-image {
    width: 100%;
    height: 100% !important;
    object-fit: cover !important;
}
