/*
Theme Name: Comzly
Theme URI: https://comzly.tech
Author: Comzly
Description: Elegant light theme — IBM Plex Sans, purple brand.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: comzly
*/

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

:root {
  --purple:       #6c51d4;
  --purple-dark:  #5240a8;
  --purple-dim:   #ede9ff;
  --purple-faint: #f5f3ff;
  --text:         #111118;
  --text-2:       #3d3b4f;
  --muted:        #6b6b80;
  --subtle:       #9898ae;
  --border:       #e2e1ee;
  --white:        #ffffff;
  --bg:           #f8f8fb;
  --font: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --radius: 10px;
  --max: 1120px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.05);
  --shadow:    0 4px 20px rgba(0,0,0,.07);
  --shadow-lg: 0 12px 40px rgba(108,81,212,.14);
}

html { scroll-behavior: smooth; }

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

a { color: var(--purple); text-decoration: none; transition: color .15s; }
a:hover { color: var(--purple-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.site-logo img { height: 30px; width: auto; }
.site-logo .logo-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.2px;
}

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 7px;
  transition: color .15s, background .15s;
}
.main-nav a:hover { color: var(--text); background: var(--bg); }
.main-nav a.current { color: var(--text); }

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--text);
  color: var(--white) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 7px 16px !important;
  border-radius: 100px !important;
  transition: background .15s, transform .15s !important;
}
.nav-pill:hover {
  background: #2a2840 !important;
  color: var(--white) !important;
  transform: none !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text);
}

/* ── Hero — large, light-weight, avery-style ────────────── */
.hero {
  padding: 112px 0 80px;
  position: relative;
  overflow: hidden;
  background: var(--white);
}

/* soft pastel gradient blobs */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 700px 400px at 15% 20%, rgba(108,81,212,.10) 0%, transparent 60%),
    radial-gradient(ellipse 600px 350px at 85% 80%, rgba(236,72,153,.07) 0%, transparent 60%),
    radial-gradient(ellipse 500px 300px at 70% 10%, rgba(59,130,246,.07) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  position: relative;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 24px;
}

.hero h1 strong { font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--purple); }

.hero-sub {
  font-size: 17px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.75;
  max-width: 540px;
  margin: 0 auto 44px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 100px;
  transition: all .2s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-dark {
  background: var(--text);
  color: var(--white);
}
.btn-dark:hover {
  background: #2a2840;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: var(--purple-faint);
}

.btn-purple {
  background: var(--purple);
  color: var(--white);
}
.btn-purple:hover {
  background: var(--purple-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108,81,212,.3);
}

/* ── Stats ──────────────────────────────────────────────── */
.stats-bar {
  padding: 56px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

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

.stat-item { padding: 0 40px; }
.stat-item + .stat-item { border-left: 1px solid var(--border); }

.stat-num {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 300;
  color: var(--text);
  letter-spacing: -2.5px;
  line-height: 1;
}
.stat-num em { font-style: normal; font-weight: 600; color: var(--purple); }

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 400;
  letter-spacing: .2px;
}

/* ── Section ────────────────────────────────────────────── */
.section { padding: 100px 0; }
.section-alt { background: var(--bg); }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 300;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-title strong { font-weight: 600; }

.section-sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.75;
  margin-bottom: 52px;
}

.text-center { text-align: center; }
.text-center .section-sub { margin-left: auto; margin-right: auto; }

/* ── Feature cards ──────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover {
  border-color: rgba(108,81,212,.3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-icon {
  font-size: 28px;
  margin-bottom: 20px;
  display: block;
}
.card h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -.2px;
}
.card p { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* ── Products grid ──────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), #a78bfa);
}
.product-card:hover {
  border-color: rgba(108,81,212,.35);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.product-icon {
  font-size: 32px;
  margin-bottom: 20px;
}
.product-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--purple-dim);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.product-card h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.4px;
  margin-bottom: 12px;
}
.product-card .tagline {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 14px;
}
.product-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 28px;
}
.product-card .btn { align-self: flex-start; }

/* ── Blog post cards ────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.post-card:hover {
  border-color: rgba(108,81,212,.3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.post-card-thumb {
  aspect-ratio: 16/9;
  background: var(--bg);
  overflow: hidden;
}
.post-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.post-card:hover .post-card-thumb img { transform: scale(1.04); }

.post-card-body { padding: 24px; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--subtle);
  margin-bottom: 10px;
}
.post-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--purple-faint);
  padding: 2px 8px;
  border-radius: 4px;
}
.post-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 8px;
  letter-spacing: -.2px;
}
.post-card h3 a { color: inherit; }
.post-card h3 a:hover { color: var(--purple); }
.post-card p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--purple);
  margin-top: 14px;
  transition: gap .15s;
}
.read-more:hover { gap: 8px; }

/* ── CTA section ────────────────────────────────────────── */
.cta-section {
  text-align: center;
  padding: 96px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.cta-section h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 300;
  color: var(--text);
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.cta-section h2 strong { font-weight: 600; }
.cta-section p {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 36px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ── Single post ────────────────────────────────────────── */
.entry-header-wrap {
  max-width: 680px; margin: 0 auto; padding: 64px 28px 0;
}
.entry-header-wrap h1 {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 300;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 20px;
}
.entry-content {
  max-width: 680px; margin: 0 auto; padding: 28px 28px 80px;
}
.entry-content h2 { font-size: 24px; font-weight: 600; color: var(--text); margin: 36px 0 12px; letter-spacing: -.3px; }
.entry-content h3 { font-size: 19px; font-weight: 600; color: var(--text); margin: 28px 0 10px; }
.entry-content p { color: var(--text-2); line-height: 1.8; margin-bottom: 18px; font-size: 16px; }
.entry-content a { color: var(--purple); border-bottom: 1px solid rgba(108,81,212,.3); }
.entry-content a:hover { border-color: var(--purple); }
.entry-content ul, .entry-content ol { padding-left: 22px; margin-bottom: 18px; list-style: disc; color: var(--text-2); }
.entry-content li { margin-bottom: 7px; line-height: 1.75; }
.entry-content blockquote {
  border-left: 2px solid var(--purple);
  padding: 16px 20px; border-radius: 0 10px 10px 0;
  background: var(--purple-faint); margin: 20px 0;
  font-style: italic; color: var(--muted);
}
.entry-content pre {
  background: #1e1b2e; color: #e2e0f0;
  padding: 20px; border-radius: 10px; overflow-x: auto; margin: 20px 0; font-size: 13px;
}
.entry-content code { background: var(--purple-dim); color: var(--purple-dark); padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.entry-content pre code { background: none; color: inherit; padding: 0; }
.entry-content img { border-radius: 10px; margin: 20px 0; }

/* ── Blog header ────────────────────────────────────────── */
.blog-header {
  padding: 72px 0 52px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.blog-header h1 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 300;
  color: var(--text);
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-bottom: 12px;
}
.blog-header h1 strong { font-weight: 600; }
.blog-header p { color: var(--muted); font-size: 16px; max-width: 480px; line-height: 1.6; }

/* ── Pagination ─────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 48px 0; }
.pagination a, .pagination .current {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--border); color: var(--muted);
  transition: all .15s;
}
.pagination a:hover, .pagination .current { background: var(--purple); border-color: var(--purple); color: var(--white); }

/* ── Generic page ───────────────────────────────────────── */
.page-wrap { padding: 72px 0 80px; }
.page-wrap h1 { font-size: clamp(26px, 4vw, 44px); font-weight: 300; color: var(--text); letter-spacing: -1px; margin-bottom: 24px; }

/* ── WP block overrides for pages ──────────────────────── */
.page-content-wrap .entry-content {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
/* Strip grey block backgrounds — let theme control bg */
.page-content-wrap .wp-block-group[style*="background"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.page-content-wrap .wp-block-group {
  max-width: 100% !important;
}
/* Constrain inner content width for readability */
.page-content-wrap .wp-block-group > * {
  max-width: 840px;
  margin-left: auto;
  margin-right: auto;
}
.entry-content h1, .entry-content h2 {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -.4px;
  color: var(--text);
}
.entry-content .wp-block-columns { gap: 28px; margin-bottom: 0; }
.entry-content .wp-block-separator { border-color: var(--border); opacity: 1; margin: 24px 0; }
/* Remove Astra/block leftover entry-header if it somehow shows */
.entry-header { display: none !important; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: #0f0e1a;
  color: #7070a0;
  padding: 64px 0 28px;
}
.footer-top { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 48px; margin-bottom: 48px; }
.footer-brand .site-logo { margin-bottom: 12px; }
.footer-brand .logo-text { color: #ffffff; }
.footer-brand p { font-size: 13px; color: #5e5e80; line-height: 1.75; max-width: 220px; }
.footer-col h4 { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #4a4a6a; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul a { font-size: 13px; color: #6060a0; transition: color .15s; }
.footer-col ul a:hover { color: #ffffff; }
.footer-bottom { border-top: 1px solid #1e1d2e; padding-top: 24px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.footer-bottom a { color: #6060a0; }
.footer-bottom a:hover { color: #ffffff; }

/* ── 404 ────────────────────────────────────────────────── */
.error-404 { padding: 120px 0; text-align: center; }
.error-404 .code { font-size: 120px; font-weight: 300; color: var(--purple); line-height: 1; opacity: .2; }
.error-404 h1 { font-size: 28px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.error-404 p { color: var(--muted); margin-bottom: 28px; }

/* ── Post featured image ────────────────────────────────── */
.post-featured-wrap {
  max-width: 760px;
  margin: 28px auto 0;
  padding: 0 28px;
}
.post-featured-wrap img {
  width: 100%;
  border-radius: 14px;
  max-height: 440px;
  object-fit: cover;
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .main-nav { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 10px 16px; gap: 2px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .stats-grid { grid-template-columns: 1fr; gap: 28px; }
  .stat-item + .stat-item { border-left: none; border-top: 1px solid var(--border); padding-top: 28px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 64px 0; }
  .products-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
}
