/* ===================================================
   ConvertIQ — Brand-Aligned Stylesheet
   Palette from Brand Master Sheet v1.0
   =================================================== */

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

:root {
  /* Brand blues */
  --ciq-blue-deep:      #1079BE;
  --ciq-blue-core:      #2189C3;
  --ciq-azure-bright:   #359AC9;
  --ciq-azure-accent:   #45A9CE;
  --ciq-cyan-light:     #59BBD4;
  --ciq-cyan-highlight: #6BCCDA;

  /* Neutrals */
  --ciq-ink:   #1A2733;
  --ciq-slate: #5A6B78;
  --ciq-mist:  #F4F8FB;
  --ciq-white: #FFFFFF;

  /* Warm accent */
  --ciq-warm:       #E8913A;
  --ciq-warm-light: #FDF4EB;

  /* Gradient */
  --ciq-gradient: linear-gradient(135deg, #1079BE 0%, #6BCCDA 100%);

  /* Type */
  --font-head: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Spacing */
  --section-pad: 80px 0;
  --container-width: 1140px;
  --gutter: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ciq-ink);
  background: var(--ciq-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ciq-blue-deep); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--ciq-azure-bright); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ciq-ink);
  line-height: 1.25;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

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

/* --- Header / Nav --- */
.site-header {
  background: var(--ciq-white);
  border-bottom: 1px solid #E8EDF2;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ciq-ink);
}
.logo svg { width: 36px; height: 36px; }
.logo span.iq { color: var(--ciq-cyan-highlight); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ciq-ink);
  margin: 6px 0;
  transition: 0.3s;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}
.main-nav a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ciq-slate);
  transition: color 0.2s;
  position: relative;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--ciq-blue-deep);
}
.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ciq-blue-deep);
  border-radius: 1px;
}

.nav-cta {
  display: inline-block;
  background: var(--ciq-blue-deep);
  color: var(--ciq-white) !important;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--ciq-azure-bright); color: var(--ciq-white) !important; }

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--ciq-white);
    border-bottom: 1px solid #E8EDF2;
    padding: 24px var(--gutter);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav ul { flex-direction: column; gap: 20px; align-items: flex-start; }
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-align: center;
}
.btn-primary {
  background: var(--ciq-blue-deep);
  color: var(--ciq-white);
}
.btn-primary:hover { background: var(--ciq-azure-bright); color: var(--ciq-white); }

.btn-outline {
  background: transparent;
  color: var(--ciq-blue-deep);
  border: 2px solid var(--ciq-blue-deep);
}
.btn-outline:hover { background: var(--ciq-blue-deep); color: var(--ciq-white); }

.btn-warm {
  background: var(--ciq-warm);
  color: var(--ciq-white);
}
.btn-warm:hover { background: #D17E2E; color: var(--ciq-white); }

/* --- Hero Section --- */
.hero {
  background: var(--ciq-ink);
  color: var(--ciq-white);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16,121,190,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero h1 { color: var(--ciq-white); margin-bottom: 20px; }
.hero .highlight { color: var(--ciq-cyan-highlight); }
.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 768px) {
  .hero { padding: 60px 0 50px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* --- Section styling --- */
.section { padding: var(--section-pad); }
.section-mist { background: var(--ciq-mist); }
.section-dark {
  background: var(--ciq-ink);
  color: var(--ciq-white);
}
.section-dark h2, .section-dark h3 { color: var(--ciq-white); }
.section-dark p { color: rgba(255,255,255,0.8); }

.section-label {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ciq-blue-deep);
  margin-bottom: 12px;
}
.section-dark .section-label { color: var(--ciq-cyan-highlight); }

.section-intro {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--ciq-slate);
  font-size: 1.1rem;
}

/* --- Stat blocks --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.stat-card {
  background: var(--ciq-white);
  border: 1px solid #E8EDF2;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
}
.stat-card .stat-number {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ciq-blue-deep);
  line-height: 1;
}
.stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--ciq-slate);
  margin-top: 8px;
}
@media (max-width: 768px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* --- Service cards --- */
.service-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.service-card {
  background: var(--ciq-white);
  border: 1px solid #E8EDF2;
  border-radius: 12px;
  padding: 40px 32px;
  transition: box-shadow 0.3s, transform 0.2s;
}
.service-card:hover {
  box-shadow: 0 8px 32px rgba(16,121,190,0.1);
  transform: translateY(-2px);
}
.service-card .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}
.service-card .card-icon.blue { background: rgba(16,121,190,0.1); color: var(--ciq-blue-deep); }
.service-card .card-icon.cyan { background: rgba(89,187,212,0.15); color: var(--ciq-azure-accent); }
.service-card .card-icon.warm { background: var(--ciq-warm-light); color: var(--ciq-warm); }

.service-card h3 { margin-bottom: 12px; }
.service-card p { color: var(--ciq-slate); margin-bottom: 20px; }
.service-card .card-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ciq-blue-deep);
}
.service-card .card-link:hover { color: var(--ciq-azure-bright); }

@media (max-width: 768px) {
  .service-cards { grid-template-columns: 1fr; }
}

/* --- Chat demo --- */
.chat-demo {
  background: var(--ciq-ink);
  border-radius: 16px;
  padding: 24px;
  max-width: 380px;
  font-size: 0.9rem;
  box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ciq-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ciq-white);
  font-weight: 700;
  font-size: 0.85rem;
}
.chat-name { color: var(--ciq-white); font-weight: 600; }
.chat-status { color: #4ADE80; font-size: 0.75rem; }

.chat-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  margin-bottom: 8px;
  max-width: 85%;
  line-height: 1.5;
}
.chat-bubble.agent {
  background: rgba(16,121,190,0.2);
  color: rgba(255,255,255,0.9);
  border-bottom-left-radius: 4px;
}
.chat-bubble.reply {
  background: var(--ciq-blue-deep);
  color: var(--ciq-white);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.chat-time {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}
.chat-time.right { text-align: right; }

/* --- Portfolio --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.portfolio-card {
  background: var(--ciq-white);
  border: 1px solid #E8EDF2;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.2s;
}
.portfolio-card:hover {
  box-shadow: 0 8px 32px rgba(16,121,190,0.1);
  transform: translateY(-2px);
}
.portfolio-preview {
  background: var(--ciq-mist);
  padding: 24px 24px 0;
  position: relative;
}
.browser-frame {
  background: var(--ciq-white);
  border-radius: 8px 8px 0 0;
  border: 1px solid #E8EDF2;
  overflow: hidden;
}
.browser-dots {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: #F1F3F5;
  border-bottom: 1px solid #E8EDF2;
}
.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.browser-dots span:nth-child(1) { background: #FF5F57; }
.browser-dots span:nth-child(2) { background: #FEBC2E; }
.browser-dots span:nth-child(3) { background: #28C840; }
.browser-site-preview {
  height: 240px;
  position: relative;
  overflow: hidden;
}
.browser-site-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.portfolio-info {
  padding: 24px;
}
.portfolio-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ciq-blue-deep);
  background: rgba(16,121,190,0.08);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.portfolio-info h3 { margin-bottom: 8px; font-size: 1.2rem; }
.portfolio-info p { color: var(--ciq-slate); font-size: 0.9rem; margin-bottom: 16px; }
.portfolio-info .card-link { font-weight: 600; font-size: 0.9rem; }

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

/* --- Testimonials --- */
.testimonial-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.testimonial-card {
  background: var(--ciq-white);
  border: 1px solid #E8EDF2;
  border-radius: 12px;
  padding: 32px;
  position: relative;
}
.testimonial-card::before {
  content: '\201C';
  font-family: Georgia, serif;
  font-size: 4rem;
  color: var(--ciq-cyan-light);
  position: absolute;
  top: 16px;
  left: 24px;
  line-height: 1;
  opacity: 0.4;
}
.testimonial-card p {
  color: var(--ciq-slate);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
  position: relative;
}
.testimonial-author {
  font-weight: 600;
  color: var(--ciq-ink);
  font-size: 0.9rem;
}
.testimonial-role {
  font-size: 0.8rem;
  color: var(--ciq-slate);
}
@media (max-width: 768px) {
  .testimonial-cards { grid-template-columns: 1fr; }
}

/* --- Steps / Process --- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.step {
  text-align: center;
  position: relative;
}
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ciq-gradient);
  color: var(--ciq-white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step h4 { font-size: 0.95rem; margin-bottom: 8px; }
.step p { font-size: 0.85rem; color: var(--ciq-slate); }
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 24px;
  left: calc(50% + 32px);
  width: calc(100% - 64px);
  height: 2px;
  background: #E8EDF2;
}
@media (max-width: 768px) {
  .process-steps { grid-template-columns: 1fr; gap: 32px; }
  .step:not(:last-child)::after { display: none; }
}

/* --- Value props --- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.value-card {
  text-align: center;
  padding: 32px 24px;
}
.value-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(16,121,190,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
}
.value-card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.value-card p { color: var(--ciq-slate); font-size: 0.95rem; }
@media (max-width: 768px) {
  .value-grid { grid-template-columns: 1fr; }
}

/* --- CTA Band --- */
.cta-band {
  background: var(--ciq-gradient);
  padding: 64px 0;
  text-align: center;
  color: var(--ciq-white);
}
.cta-band h2 { color: var(--ciq-white); margin-bottom: 16px; }
.cta-band p { color: rgba(255,255,255,0.9); margin-bottom: 32px; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-band .btn-primary {
  background: var(--ciq-white);
  color: var(--ciq-blue-deep);
}
.cta-band .btn-primary:hover { background: var(--ciq-mist); color: var(--ciq-blue-deep); }

/* --- Contact form --- */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
}
.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ciq-ink);
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #D1D9E0;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ciq-ink);
  background: var(--ciq-white);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--ciq-blue-deep);
  box-shadow: 0 0 0 3px rgba(16,121,190,0.1);
}
.form-group textarea { resize: vertical; min-height: 140px; }

/* --- Footer --- */
.site-footer {
  background: var(--ciq-ink);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand {
  font-size: 0.9rem;
  line-height: 1.7;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand .logo span { color: var(--ciq-white); }

.site-footer h4 {
  color: var(--ciq-white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.site-footer a:hover { color: var(--ciq-cyan-highlight); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}
.footer-bottom a { color: rgba(255,255,255,0.5); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* --- Page header (inner pages) --- */
.page-header {
  background: var(--ciq-mist);
  padding: 60px 0 48px;
  text-align: center;
}
.page-header .section-label { margin-bottom: 8px; }
.page-header h1 { margin-bottom: 16px; }
.page-header p { max-width: 600px; margin: 0 auto; color: var(--ciq-slate); font-size: 1.1rem; }

/* --- Two-col layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: 40px; }
}

/* --- Problem cards --- */
.problem-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.problem-card {
  background: var(--ciq-white);
  border: 1px solid #E8EDF2;
  border-radius: 12px;
  padding: 28px 24px;
}
.problem-card .problem-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.problem-card h4 { margin-bottom: 8px; font-size: 1rem; }
.problem-card p { color: var(--ciq-slate); font-size: 0.9rem; }

@media (max-width: 768px) {
  .problem-cards { grid-template-columns: 1fr; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }


/* --- Blog --- */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.blog-card { background: var(--ciq-white); border: 1px solid #E8EDF2; border-radius: 12px; padding: 32px; display: flex; flex-direction: column; transition: box-shadow 0.3s, transform 0.2s; }
.blog-card:hover { box-shadow: 0 8px 32px rgba(16,121,190,0.1); transform: translateY(-2px); }
.blog-card .blog-meta { font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ciq-blue-deep); margin-bottom: 12px; }
.blog-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.blog-card p { color: var(--ciq-slate); font-size: 0.92rem; line-height: 1.7; margin-bottom: 20px; flex-grow: 1; }
.blog-card .card-link { font-weight: 600; font-size: 0.9rem; margin-top: auto; }

.article { max-width: 720px; margin: 0 auto; }
.article .article-meta { font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ciq-blue-deep); margin-bottom: 16px; }
.article h1 { font-size: 2.1rem; line-height: 1.2; margin-bottom: 20px; }
.article .lead { font-size: 1.18rem; line-height: 1.7; color: var(--ciq-slate); margin-bottom: 8px; }
.article h2 { font-size: 1.4rem; margin: 40px 0 14px; }
.article p { color: var(--ciq-ink); font-size: 1.05rem; line-height: 1.8; margin-bottom: 18px; }
.article a { font-weight: 500; }
.article-faq { margin-top: 52px; padding-top: 32px; border-top: 1px solid #E8EDF2; }
.article-faq h2 { font-size: 1.4rem; margin-bottom: 22px; margin-top: 0; }
.faq-item { margin-bottom: 22px; }
.faq-item h3 { font-size: 1.05rem; margin-bottom: 6px; color: var(--ciq-ink); }
.faq-item p { color: var(--ciq-slate); font-size: 1rem; line-height: 1.7; margin-bottom: 0; }
.article-sources { margin-top: 44px; padding: 26px 30px; background: var(--ciq-mist); border-radius: 12px; }
.article-sources h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ciq-slate); margin: 0 0 14px; }
.article-sources ul { list-style: none; padding: 0; margin: 0; }
.article-sources li { font-size: 0.9rem; color: var(--ciq-slate); line-height: 1.6; margin-bottom: 10px; }
.article-sources a { word-break: break-word; }
.article-back { display: inline-block; margin-top: 36px; font-weight: 600; font-size: 0.9rem; }

@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .article h1 { font-size: 1.7rem; }
}
