/* =============================================
   CreativeCoreLab — Main Stylesheet
   Template-matched spacing, icons, footer
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blue:        #1B52D8;
    --blue-light:  #EEF2FF;
    --blue-dark:   #1240B0;
    --navy:        #1A1E2E;
    --text:        #111827;
    --text-mid:    #374151;
    --text-light:  #6B7280;
    --border:      #E5E7EB;
    --bg:          #FFFFFF;
    --bg-soft:     #F9FAFB;
    --shadow-sm:   0 1px 3px rgba(0,0,0,.06);
    --shadow-md:   0 4px 16px rgba(0,0,0,.08);
    --radius:      12px;
    --font:        'Inter', system-ui, -apple-system, sans-serif;
    --max-w:       1180px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* Prevent image/icon dragging globally */
img, svg {
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
}
img { max-width: 100%; display: block; }
.icon-img { object-fit: contain; pointer-events: none; }

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

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 11px 26px;
    border-radius: 7px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-primary {
    background: var(--blue);
    color: #fff;
    border: 2px solid var(--blue);
}
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); transform: translateY(-1px); }
.btn-outline {
    background: transparent;
    color: var(--blue);
    border: 2px solid var(--blue);
}
.btn-outline:hover { background: var(--blue-light); transform: translateY(-1px); }

/* --- Section title --- */
.section-title {
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 700;
    text-align: center;
    color: var(--text);
    margin-bottom: 36px;
}

/* =============================================
   NAVBAR — compact, matches template
   ============================================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--border);
    height: 62px;
}
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.2px;
}
.logo-light { color: #fff; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
}
.nav-links a {
    padding: 5px 13px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-mid);
    transition: color .15s;
}
.nav-links a:hover { color: var(--blue); }
.nav-links a.active {
    color: var(--blue);
    font-weight: 600;
    border-bottom: 2px solid var(--blue);
    border-radius: 0;
    padding-bottom: 3px;
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all .2s;
}

/* =============================================
   HERO — tight spacing matching template
   ============================================= */
.hero {
    /* Template: ~60px top, ~48px bottom */
    padding: 60px 0 48px;
    overflow: hidden;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
}
.hero-text h1 {
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    color: var(--text);
    margin-bottom: 18px;
}
.hero-text p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.75;
    max-width: 460px;
    margin-bottom: 28px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero visual — image + dots */
.hero-visual {
    position: relative;
    height: 340px;
    display: flex;
    align-items: center;
}
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    position: relative;
    z-index: 1;
    pointer-events: none; /* non-draggable */
}
.dots-grid {
    position: absolute;
    top: 10px;
    right: -10px;
    width: 90px;
    height: 90px;
    background-image: radial-gradient(circle, #CBD5E1 1.2px, transparent 1.2px);
    background-size: 11px 11px;
    opacity: .65;
    z-index: 0;
}

/* =============================================
   WHO WE ARE — matches template tight padding
   ============================================= */
.who-we-are {
    /* Template: ~40px top/bottom */
    padding: 40px 0;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.who-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 32px;
    align-items: center;
}
.who-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #EBEBF0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.who-icon .icon-img { width: 40px; height: 40px; }
.who-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}
.who-content p {
    font-size: 14px;
    color: var(--text-light);
    max-width: 700px;
    line-height: 1.75;
}

/* =============================================
   SERVICES — tightened to match template
   ============================================= */
.services-section {
    /* Template: ~52px top/bottom */
    padding: 52px 0;
    background: var(--bg);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.service-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    transition: box-shadow .2s, transform .2s;
}
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

/* Service icon — matches template rounded-square style */
.service-icon {
    width: 62px;
    height: 62px;
    background: var(--blue-light);
    border-radius: 18px; /* matches template rounding */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    flex-shrink: 0;
    pointer-events: none; /* non-draggable */
}
.service-icon .icon-img { width: 36px; height: 36px; }
.service-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}
.service-card p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.65;
}

/* =============================================
   PORTFOLIO — tightened
   ============================================= */
.portfolio-section {
    /* Template: ~52px top/bottom */
    padding: 52px 0;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.portfolio-item {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow .2s, transform .2s;
}
.portfolio-item:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.portfolio-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--navy);
}
.portfolio-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
    pointer-events: none; /* non-draggable */
}
.portfolio-item:hover .portfolio-thumb img { transform: scale(1.04); }
.portfolio-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: rgba(255,255,255,.15);
}
.portfolio-info { padding: 14px 16px 16px; }
.portfolio-info h3 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text);
}
.portfolio-info p {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.55;
}
.portfolio-cta { text-align: center; }

/* Portfolio full page grid */
.portfolio-grid-full {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}

/* =============================================
   PROCESS — horizontal flow, matches template
   ============================================= */
.process-section {
    /* Template: ~52px top/bottom */
    padding: 52px 0;
    background: var(--bg);
}
.process-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 980px;
    margin: 0 auto;
}
.process-step {
    display: flex;
    align-items: center;
    gap: 14px;
}
.step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.step-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.step-icon .icon-img { width: 26px; height: 26px; }
.step-text { min-width: 0; }
.step-text h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}
.step-text p {
    font-size: 12.5px;
    color: var(--text-light);
    max-width: 160px;
    line-height: 1.55;
}
.step-dash {
    flex: 1 1 30px;
    min-width: 24px;
    max-width: 70px;
    border-top: 2px dashed #C7D2FE;
    margin: 0 10px;
    align-self: center;
}

/* legacy (unused) keep harmless */
.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
/* legacy connector classes no longer used */

/* =============================================
   CTA BANNER — matches template
   ============================================= */
.cta-banner {
    /* Template: ~36px top/bottom */
    padding: 36px 0;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.cta-inner {
    display: flex;
    align-items: center;
    gap: 28px;
}
.cta-icon {
    width: 60px;
    height: 60px;
    background: var(--blue-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cta-icon .icon-img { width: 30px; height: 30px; }
.cta-text { flex: 1; }
.cta-text h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}
.cta-text p {
    font-size: 13px;
    color: var(--text-light);
    max-width: 540px;
    line-height: 1.65;
}
.cta-btn { flex-shrink: 0; }

/* =============================================
   FOOTER — icons only with dividers
   ============================================= */
.footer {
    background: var(--navy);
    padding: 36px 0;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-brand .logo-light {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 7px;
    color: #fff;
}
.footer-brand p {
    font-size: 12px;
    color: rgba(255,255,255,.4);
    max-width: 200px;
    line-height: 1.6;
}

/* Social icons — icon + label, with vertical separators */
.footer-social {
    display: flex;
    align-items: center;
    gap: 0;
}
.social-icon-link {
    color: rgba(255,255,255,.65);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: color .15s;
}
.social-icon-link span { white-space: nowrap; }
.social-icon-link:hover { color: #fff; }
.social-icon-link svg { pointer-events: none; flex-shrink: 0; }

/* Vertical separator between icons */
.social-sep {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,.18);
    flex-shrink: 0;
}

/* =============================================
   PAGE HEADERS (about, services etc.)
   ============================================= */
.page-header {
    padding: 52px 0 40px;
    border-bottom: 1px solid var(--border);
}
.page-header h1 {
    font-size: clamp(26px, 3.5vw, 42px);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 10px;
}
.page-header p {
    font-size: 14px;
    color: var(--text-light);
    max-width: 500px;
}

/* About / Services pages */
.about-section, .services-page-section { padding: 52px 0; }
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.about-text h2 { font-size: 26px; font-weight: 700; margin-bottom: 14px; }
.about-text p { color: var(--text-light); margin-bottom: 14px; line-height: 1.75; font-size: 14px; }

.services-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}
.service-detail-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
}
.service-detail-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.service-detail-card p { color: var(--text-light); font-size: 13px; line-height: 1.7; }
.service-detail-card ul { color: var(--text-light); font-size: 13px; padding-left: 16px; margin-top: 8px; line-height: 1.8; }

/* Contact page */
.contact-section { padding: 52px 0; }
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}
.contact-info h2 { font-size: 26px; font-weight: 700; margin-bottom: 14px; }
.contact-info p { color: var(--text-light); margin-bottom: 28px; line-height: 1.7; font-size: 14px; }
.contact-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-mid);
}
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--text-mid); }
.form-group input, .form-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 14px;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(27,82,216,.1);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-success { color: #059669; font-weight: 500; font-size: 14px; }
.form-error   { color: #DC2626; font-weight: 500; font-size: 14px; }

/* Geo composition (about page) */
.geo-composition { position: relative; height: 260px; }
.geo { position: absolute; border-radius: 6px; }
.geo-circle { width: 90px; height: 90px; border-radius: 50%; background: #B8C9E8; top: 20px; left: 30px; opacity:.85; }
.geo-block-tall { width: 80px; height: 170px; background: #2C4A7E; top: 50px; right: 50px; border-radius: 7px; }
.geo-block-wide { width: 160px; height: 80px; background: #D4D8E0; bottom: 30px; left: 10px; border-radius: 7px; }
.geo-block-small { width: 70px; height: 70px; background: #C5C9D2; bottom: 48px; left: 180px; border-radius: 7px; }

/* =============================================
   RESPONSIVE — TABLET
   ============================================= */
@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; gap: 32px; }
    .hero-visual { height: 220px; }
    .hero-text h1 { font-size: 36px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid-full { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; gap: 32px; }
    .contact-grid { grid-template-columns: 1fr; gap: 36px; }
    .cta-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
    .process-steps { flex-direction: column; gap: 22px; align-items: flex-start; max-width: 360px; }
    .process-step { width: 100%; }
    .step-dash { display: none; }
    .step-text p { max-width: none; }
}

/* =============================================
   RESPONSIVE — MOBILE
   No huge gaps, tight matching template mobile
   ============================================= */
@media (max-width: 640px) {
    /* Nav */
    .nav-links {
        display: none;
        position: absolute;
        top: 62px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px 20px;
        gap: 0;
        z-index: 99;
    }
    .nav-links.open { display: flex; }
    .nav-links li a {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
    }
    .nav-links li:last-child a { border-bottom: none; }
    .nav-toggle { display: flex; }

    /* Tighter sections on mobile */
    .hero            { padding: 36px 0 28px; }
    .who-we-are      { padding: 28px 0; }
    .services-section{ padding: 36px 0; }
    .portfolio-section{ padding: 36px 0; }
    .process-section { padding: 36px 0; }
    .cta-banner      { padding: 24px 0; }
    .footer          { padding: 28px 0; }

    .section-title { margin-bottom: 24px; }

    .hero-text h1 { font-size: 28px; letter-spacing: -.5px; }
    .hero-text p  { font-size: 13px; }
    .hero-visual  { height: 180px; }

    .services-grid     { grid-template-columns: 1fr; gap: 12px; }
    .portfolio-grid    { grid-template-columns: 1fr; }
    .portfolio-grid-full { grid-template-columns: 1fr; }
    .services-list     { grid-template-columns: 1fr; }

    .who-inner { grid-template-columns: 1fr; gap: 20px; }

    .footer-inner { flex-direction: column; gap: 20px; }
    .footer-social { flex-wrap: wrap; gap: 0; }

    .cta-inner { gap: 14px; }
    .cta-text h2 { font-size: 17px; }
    .cta-text p  { font-size: 13px; }
    .cta-btn { width: 100%; justify-content: center; }

    .page-header { padding: 36px 0 28px; }
    .about-section, .services-page-section, .contact-section { padding: 36px 0; }
}
