/* GridKern — custom.css
   Accent: #f59e0b
   Industry: AI-powered electrical grid load forecasting & demand-response optimization
*/

/* =============================================
   CSS Variables
   ============================================= */
:root {
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fde68a;
    --bg: #0d1117;
    --surface: #161b27;
    --surface2: #1e2435;
    --text: #e2e8f0;
    --text-muted: #8fabc4;
    --border: rgba(255,255,255,0.08);
    --radius: 10px;
    --nav-height: 72px;
}

/* =============================================
   Base Overrides
   ============================================= */
body {
    font-size: 18px;
    font-family: "Raleway", sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.9;
}

h1, h2, h3, h4, h5, h6 {
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: var(--text);
}

a {
    color: var(--accent);
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: var(--accent-dark);
    text-decoration: none;
}

p {
    font-size: 18px;
    line-height: 1.9;
    color: var(--text-muted);
}

/* =============================================
   Typography Scale
   ============================================= */
.hero-h1 {
    font-size: 58px;
    font-weight: 700;
    line-height: 1.15;
    color: #ffffff;
}

.section-h2 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
}

.nav-link {
    font-size: 15px !important;
    font-weight: 500;
}

/* =============================================
   Container Narrow
   ============================================= */
.container-narrow {
    max-width: 720px;
    margin: 0 auto;
}

/* =============================================
   Navbar Overrides
   ============================================= */
.tm-navbar {
    background-color: rgba(13, 17, 23, 0.92) !important;
    border-bottom: 1px solid var(--border);
}

.tm-navbar .navbar-brand {
    color: var(--accent) !important;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tm-navbar .navbar-brand img {
    height: 36px;
    width: auto;
}

.tm-navbar .tm-nav-link {
    color: var(--text) !important;
    font-size: 15px;
    font-weight: 500;
}

.tm-navbar .tm-nav-link:hover,
.tm-navbar .tm-nav-link:focus,
.tm-navbar .tm-nav-link.active {
    color: var(--accent) !important;
    background-color: transparent !important;
}

.tm-navbar.scroll {
    background-color: rgba(13, 17, 23, 0.98) !important;
    border-bottom: 1px solid var(--border);
}

.tm-navbar.scroll .navbar-brand,
.tm-navbar.scroll .tm-nav-link {
    color: var(--text) !important;
}

.tm-navbar.scroll .tm-nav-link:hover {
    color: var(--accent) !important;
    background-color: transparent !important;
}

.navbar-toggler {
    border-color: var(--border) !important;
}

.navbar-toggler-icon {
    color: var(--text) !important;
}

/* R77 */
.nav-item {
    margin-bottom: 0 !important;
    background-image: none !important;
}

.site-logo {
    max-width: none !important;
}

/* =============================================
   Hero Section
   ============================================= */
#infinite,
.page-hero {
    background-color: var(--bg);
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    color: #ffffff;
}

.page-hero {
    min-height: 480px;
    padding: 120px 0 60px;
}

/* R79 */
.header-thumb {
    background: transparent !important;
    border: none !important;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13,17,23,0.82) 0%, rgba(13,17,23,0.55) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.tm-hero-text-container {
    position: relative;
    z-index: 2;
}

.tm-hero-text-container-inner {
    margin-top: -90px;
}

.tm-hero-title {
    font-size: 58px !important;
    font-weight: 700 !important;
    line-height: 1.15;
    color: #ffffff;
    text-shadow: none;
}

.tm-hero-subtitle {
    font-size: 20px;
    color: rgba(255,255,255,0.85);
    text-shadow: none;
    margin-top: 16px;
}

/* R89 */
.tm-bg-overlay,
[class*="overlay"] {
    pointer-events: none !important;
}

/* =============================================
   Buttons (R75 + R-BTN)
   ============================================= */

/* Dark background button (accent-filled) */
.btn-accent {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent);
    color: #0d1117 !important;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    border: 2px solid var(--accent);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-accent:hover, .btn-accent:focus {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #0d1117 !important;
}

/* Dark-bg outline button: white border/text */
.btn-outline-dark-bg {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    border: 2px solid rgba(255,255,255,0.6);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline-dark-bg:hover, .btn-outline-dark-bg:focus {
    border-color: var(--accent);
    color: var(--accent) !important;
    background-color: transparent;
}

/* Light-bg outline button: dark border/text */
.btn-outline-light-bg {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    color: #1e293b !important;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    border: 2px solid #1e293b;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline-light-bg:hover, .btn-outline-light-bg:focus {
    background-color: #1e293b;
    color: #ffffff !important;
}

/* tm-btn-primary override */
.tm-btn-primary {
    background-color: var(--accent) !important;
    color: #0d1117 !important;
    border: none;
    padding: 12px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.tm-btn-primary:hover, .tm-btn-primary:focus {
    background-color: var(--accent-dark) !important;
    color: #0d1117 !important;
}

.btn-cta-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background-color: var(--accent);
    color: #0d1117 !important;
    font-size: 16px;
    font-weight: 700;
    border-radius: var(--radius);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-cta-hero:hover {
    background-color: var(--accent-dark);
    color: #0d1117 !important;
}

/* =============================================
   Sections Layout
   ============================================= */
.section-pad {
    padding: 90px 0;
}

.section-pad-sm {
    padding: 60px 0;
}

.section-dark {
    background-color: var(--bg);
    color: var(--text);
}

.section-surface {
    background-color: var(--surface);
    color: var(--text);
}

.section-surface2 {
    background-color: var(--surface2);
    color: var(--text);
}

.section-accent-top {
    border-top: 3px solid var(--accent);
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 620px;
}

/* =============================================
   Feature Cards
   ============================================= */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

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

@media (max-width: 575px) {
    .feature-grid { grid-template-columns: 1fr; }
}

.feature-card {
    background-color: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

/* R87 */
.feature-card .card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--accent);
}

.feature-card .card-icon .fa {
    font-size: 28px;
    color: var(--accent) !important;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
}

/* R81 */
.feature-icon .fa,
.card-icon .fa,
.step-icon .fa {
    color: var(--accent) !important;
}

/* =============================================
   Steps / How It Works (R80 — CSS Grid)
   ============================================= */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

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

@media (max-width: 575px) {
    .steps-grid { grid-template-columns: 1fr; }
}

.step-card {
    text-align: center;
    background-color: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
}

.step-number {
    width: 48px;
    height: 48px;
    background-color: var(--accent);
    color: #0d1117;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step-icon {
    margin-bottom: 12px;
}

.step-icon .fa {
    font-size: 32px;
    color: var(--accent) !important;
}

.step-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.step-card p {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
}

/* =============================================
   Stats Bar
   ============================================= */
.stats-bar {
    background-color: var(--surface2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 48px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

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

.stat-item .stat-number {
    font-size: 40px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.1;
}

.stat-item .stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* =============================================
   Blog Grid (R78)
   ============================================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

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

@media (max-width: 575px) {
    .blog-grid { grid-template-columns: 1fr; }
}

.blog-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.blog-card:hover {
    border-color: var(--accent);
}

.blog-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-card-body {
    padding: 20px;
}

.blog-card-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.blog-card-meta .tag {
    color: var(--accent);
    font-weight: 600;
    margin-right: 8px;
}

.blog-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card p {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.blog-card .read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.blog-card .read-more:hover {
    color: var(--accent-dark);
}

/* R-IMG */
article img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}

/* =============================================
   Team Cards (R84 — founders only)
   ============================================= */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

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

@media (max-width: 480px) {
    .team-grid { grid-template-columns: 1fr; }
}

.team-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-align: center;
}

.team-card-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    /* R86 */
    object-position: center;
    display: block;
}

.team-card-body {
    padding: 20px;
}

.team-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.team-card .team-role {
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 10px;
}

.team-card p {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
}

/* =============================================
   Testimonials
   ============================================= */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

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

@media (max-width: 575px) {
    .testimonial-grid { grid-template-columns: 1fr; }
}

.testimonial-card {
    background-color: var(--surface2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 24px;
}

.testimonial-card blockquote {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.8;
    margin: 0 0 16px;
    font-style: italic;
}

.testimonial-card cite {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    font-style: normal;
}

.testimonial-card .cite-role {
    font-size: 13px;
    color: var(--text-muted);
}

/* =============================================
   Pricing (R69 — cards divisible by column count)
   ============================================= */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: start;
}

@media (max-width: 767px) {
    .pricing-grid { grid-template-columns: 1fr; }
}

.pricing-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.pricing-card.featured {
    border-color: var(--accent);
    background-color: var(--surface2);
    position: relative;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent);
    color: #0d1117;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

.pricing-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.price-amount {
    font-size: 40px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.1;
}

.price-period {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.pricing-features li {
    font-size: 15px;
    color: var(--text-muted);
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features li .fa {
    color: var(--accent);
    font-size: 13px;
}

/* =============================================
   Contact Form
   ============================================= */
.contact-form-wrap {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-control-custom {
    width: 100%;
    padding: 10px 16px;
    background-color: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-control-custom:focus {
    outline: none;
    border-color: var(--accent);
}

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

/* =============================================
   Footer
   ============================================= */
.site-footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    padding: 60px 0 0;
    color: var(--text-muted);
    font-size: 16px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 767px) {
    .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 8px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    font-size: 15px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* =============================================
   Cookie Banner
   ============================================= */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--surface2);
    border-top: 2px solid var(--accent);
    z-index: 9999;
    padding: 16px 0;
}

.cookie-content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-text strong {
    color: var(--text);
    font-size: 15px;
}

.cookie-text p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

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

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

#cookie-accept {
    padding: 8px 20px;
    background-color: var(--accent);
    color: #0d1117;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#cookie-decline {
    padding: 8px 20px;
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* =============================================
   Utility / Dark Section Text Overrides (R85)
   ============================================= */
.section-dark .section-title,
.section-surface .section-title,
.section-surface2 .section-title {
    color: #e2e8f0;
}

.section-dark p,
.section-surface p,
.section-surface2 p {
    color: #c8d6e5;
}

.section-dark .section-subtitle,
.section-surface .section-subtitle,
.section-surface2 .section-subtitle {
    color: #8fabc4;
}

/* No opacity on dark section text (R85) */
.section-dark *,
.section-surface *,
.section-surface2 * {
    opacity: 1;
}

/* =============================================
   Page Hero (inner pages)
   ============================================= */
.inner-page-hero {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 120px 0 60px;
    text-align: center;
}

.inner-page-hero h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.inner-page-hero p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto;
}

/* =============================================
   CTA Section
   ============================================= */
.cta-section {
    background-color: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 60px 40px;
    text-align: center;
}

.cta-section h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.cta-section p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* =============================================
   About Page
   ============================================= */
.about-story {
    background-color: var(--surface);
    padding: 80px 0;
}

.about-story h2 {
    font-size: 40px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

.about-story p {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 20px;
}

.about-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

/* =============================================
   Product Page
   ============================================= */
.product-screenshot {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background-color: var(--surface2);
}

.product-screenshot img {
    width: 100%;
    height: auto;
    display: block;
}

/* =============================================
   Miscellaneous
   ============================================= */
.tag-label {
    display: inline-block;
    padding: 3px 12px;
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

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

.bg-accent-subtle {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius);
    padding: 20px;
}

@media (max-width: 767px) {
    .tm-hero-title { font-size: 38px !important; }
    .section-title { font-size: 30px; }
    .inner-page-hero h1 { font-size: 34px; }
    .hero-h1 { font-size: 38px; }
    .section-h2 { font-size: 30px; }
}

/* FAQ equal-height cards (fix Bootstrap col-md-6 unequal row heights) */
.section-pad .row.faq-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}
.section-pad .row.faq-row > [class*="col-"] {
    display: contents;
}
