/* =========================================
   KIO DIGITAL - INTENTIONAL MINIMALISM
   ========================================= */

:root {
    /* Color Palette */
    --bg-primary: #0D0F12;
    --bg-surface: #1A1D24;
    --bg-surface-hover: #232730;
    --bg-glass: rgba(13, 15, 18, 0.85);
    
    --accent-indigo: #4F46E5;
    --accent-indigo-hover: #4338CA;
    --accent-emerald: #10B981;
    
    --text-main: #F9FAFB;
    --text-muted: #9CA3AF;
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Typography */
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --container-width: 1280px;
    --inner-content-width: 840px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-md: 12px;
    --radius-lg: 24px;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: 80px; /* Offset for fixed header */
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1.5rem; color: var(--text-muted); }

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

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding { padding: 100px 0; }
.bg-surface { background-color: var(--bg-surface); }

/* Grid Systems */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }

/* Buttons & Links */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent-indigo);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--accent-indigo-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.05);
    border-color: var(--text-muted);
}

.btn-block { width: 100%; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--accent-indigo);
}
.link-arrow:hover { gap: 12px; }

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img { height: 32px; }

.main-nav {
    display: flex;
    gap: 32px;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.main-nav a:hover,
.main-nav a[data-cms-menu="blog"]:hover {
    color: var(--text-main);
}

/* =========================================
   HOME: HERO SECTION
   ========================================= */
.hero {
    padding: 80px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content .subtitle {
    font-size: 1.125rem;
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
}

.floating-img {
    border-radius: var(--radius-lg);
    animation: float 6s ease-in-out infinite;
}

.glass-card {
    background: rgba(26, 29, 36, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-md);
    position: absolute;
    display: flex;
    flex-direction: column;
}

.top-right { top: 20px; right: -20px; }
.bottom-left { bottom: 40px; left: -20px; }

.stat-value { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--accent-emerald); }
.stat-label { font-size: 0.875rem; color: var(--text-muted); }

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* =========================================
   HOME: SEGMENTS & SERVICES
   ========================================= */
.section-header { margin-bottom: 60px; max-width: 600px; }

.segment-card {
    background: var(--bg-surface);
    padding: 32px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: var(--transition);
}

.segment-card:hover {
    border-color: var(--border-color);
    background: var(--bg-surface-hover);
}

.segment-icon {
    width: 48px;
    height: 48px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--accent-indigo);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.service-card {
    display: flex;
    justify-content: space-between;
    background: var(--bg-primary);
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    group: hover;
}

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

.service-list {
    list-style: none;
    margin-top: 16px;
}
.service-list li {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}
.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--accent-emerald);
    border-radius: 50%;
}

.service-arrow {
    color: var(--text-muted);
    transition: var(--transition);
}
.service-card:hover .service-arrow {
    color: var(--accent-indigo);
    transform: translateX(5px) scale(1.1);
}

/* =========================================
   FORMS & CTA SECTION
   ========================================= */
.cta-box {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    border: 1px solid var(--border-color);
}

.check-list { list-style: none; }
.check-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.check-list li::before {
    content: '✓';
    color: var(--accent-emerald);
    font-weight: bold;
}

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

input[type="text"],
input[type="tel"],
input[type="email"] {
    width: 100%;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

input:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.form-policy {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 16px;
    text-align: center;
}

.form-message { margin-top: 16px; font-size: 0.875rem; text-align: center; }
.form-message.success { color: var(--accent-emerald); }

/* =========================================
   INNER PAGE (BLOG/ARTICLE) LAYOUT
   ========================================= */
/* Wrapper dictates the central column width */
.inner-page .content-wrapper {
    max-width: var(--inner-content-width);
    margin: 0 auto;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.meta-tag {
    color: var(--accent-indigo);
    font-weight: 600;
}

.post-body h2 { margin-top: 48px; }
.post-body .lead { font-size: 1.25rem; color: var(--text-main); margin-bottom: 32px;}

.post-body ul {
    margin-bottom: 24px;
    padding-left: 24px;
    color: var(--text-muted);
}
.post-body ul li { margin-bottom: 12px; }

.post-body blockquote {
    border-left: 4px solid var(--accent-indigo);
    padding: 24px;
    margin: 40px 0;
    background: var(--bg-surface);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-main);
}

.lead-magnet-box {
    margin-top: 60px;
    background: linear-gradient(135deg, rgba(79,70,229,0.1) 0%, rgba(26,29,36,1) 100%);
    border: 1px solid var(--accent-indigo);
    padding: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 32px;
}

.magnet-form {
    display: flex;
    gap: 12px;
    width: 100%;
}
.magnet-form input { flex: 1; margin-bottom: 0; }
.magnet-form button { white-space: nowrap; }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 80px 0 24px;
    background: var(--bg-surface);
}

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

.footer-logo { height: 32px; margin-bottom: 20px; filter: grayscale(100%) opacity(0.7); }

.site-footer h4 { font-size: 1.125rem; margin-bottom: 20px; }
.site-footer p { margin-bottom: 12px; }

.contact-link { color: var(--text-main); font-weight: 500; }
.contact-link:hover { color: var(--accent-indigo); }

.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--text-main); padding-left: 4px; }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* =========================================
   MODAL WINDOW
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 15, 18, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-surface);
    padding: 48px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    position: relative;
    border: 1px solid var(--border-color);
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}
.modal-close:hover { color: var(--text-main); transform: rotate(90deg); }


/* =========================================
   RESPONSIVE DESIGN (Mobile First adapted above, max-width tweaks here)
   ========================================= */
@media (max-width: 992px) {
    .hero-grid, .cta-box, .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .lead-magnet-box { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
    .main-nav { display: none; /* In real project, add burger menu logic */ }
    .site-header .btn { display: none; }
    .magnet-form { flex-direction: column; }
    h1 { font-size: 2.2rem; }
}
/* --- Smart Hub Styles (Avant-Garde/Minimalism) --- */
.smart-hub {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.hub-controls {
    margin-bottom: 2rem;
}

.hub-search {
    position: relative;
    max-width: 400px;
}

.hub-search input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.hub-search input:focus {
    outline: none;
    border-color: #333;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hub-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.hub-card {
    background: transparent;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 400px;
}

.hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.hub-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.hub-card__image-wrapper {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.hub-card__image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hub-card:hover .hub-card__image-wrapper img {
    transform: scale(1.05);
}

/* Pattern Thumbnails */
.hub-card__image-wrapper.pattern-0 {
    background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%);
}

.hub-card__image-wrapper.pattern-1 {
    background: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
}

.hub-card__image-wrapper.pattern-2 {
    background: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
}

.hub-card__image-wrapper.pattern-3 {
    background: linear-gradient(120deg, #d4fc79 0%, #96e6a1 100%);
}

.hub-card__image-wrapper.pattern-4 {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
}

.hub-card__image-wrapper.pattern-5 {
    background: linear-gradient(to right, #43e97b 0%, #38f9d7 100%);
}

.hub-card__image-wrapper.pattern-6 {
    background: linear-gradient(to top, #30cfd0 0%, #330867 100%);
}

.hub-card__image-wrapper.pattern-7 {
    background: linear-gradient(to right, #fa709a 0%, #fee140 100%);
}

.hub-card__image-wrapper.pattern-8 {
    background: linear-gradient(to top, #5ee7df 0%, #b490ca 100%);
}

.hub-card__image-wrapper.pattern-9 {
    background: linear-gradient(to right, #f78ca0 0%, #f9748f 19%, #fd868c 60%, #fe9a8b 100%);
}

.hub-card__content {
    padding: 1.5rem;
}

.hub-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: inherit;
    line-height: 1.4;
}

.hub-card__excerpt {
    font-size: 0.9rem;
    color: inherit;
    opacity: 0.8;
    line-height: 1.6;
}

.hub-footer {
    margin-top: 3rem;
    text-align: center;
}

/* Related Posts */
.related-posts {
    margin-top: 4rem;
    margin-bottom: 6rem;
    padding-top: 2rem;
    border-top: 1px solid #eaeaea;
}

.related-posts__heading {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.related-post-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.related-post-card:hover {
    background: rgba(128, 128, 128, 0.05);
}

.related-post-card__image {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}

.related-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-card__title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

/* Utilities */
.btn-clean {
    background: none;
    border: 1px solid #333;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-clean:hover {
    background: #333;
    color: #fff;
}