/* LuperIQ CMS — Public Site Styles */

:root {
    --bg: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    --max-width: 800px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    background: var(--header-bg, var(--bg));
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--header-text, var(--text));
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    margin-left: 24px;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a.active { color: var(--text); font-weight: 500; }

/* Main */
.site-main {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px;
    width: 100%;
}

/* Article */
.page-article h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--text);
}

.page-content {
    font-size: 17px;
    line-height: 1.8;
    color: #334155;
}

.page-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 40px 0 16px;
    color: var(--text);
}

.page-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 12px;
    color: var(--text);
}

.page-content p {
    margin-bottom: 16px;
}

.page-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.page-content a:hover {
    color: var(--accent-hover);
}

.page-content ul, .page-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.page-content li {
    margin-bottom: 8px;
}

.page-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    margin: 24px 0;
    background: var(--surface);
    border-radius: 0 6px 6px 0;
    color: var(--text-muted);
    font-style: italic;
}

.page-content pre {
    background: var(--code-bg, #0f172a);
    color: var(--code-text, #e2e8f0);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.6;
}

.page-content code {
    font-family: var(--mono);
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.page-content pre code {
    background: transparent;
    padding: 0;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}

.page-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.page-content th, .page-content td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.page-content th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

/* Blog listing */
.blog-listing h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
    color: var(--text);
}

.blog-card {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.blog-card:last-child { border-bottom: none; }

.blog-card h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.blog-card h2 a {
    color: var(--text);
    text-decoration: none;
}
.blog-card h2 a:hover { color: var(--accent); }

.blog-date {
    font-size: 13px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.blog-excerpt {
    color: #475569;
    line-height: 1.6;
}

.blog-empty {
    color: var(--text-muted);
    padding: 40px 0;
    text-align: center;
}

.blog-post-date {
    font-size: 14px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 32px;
}

.blog-post-nav {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.blog-post-nav a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.blog-post-nav a:hover { text-decoration: underline; }

/* 404 */
.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page h1 {
    font-size: 72px;
    color: var(--border);
    margin-bottom: 8px;
}

.error-subtitle {
    font-size: 22px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.error-detail {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 24px;
}

.error-detail code {
    font-family: var(--mono);
    background: var(--surface);
    padding: 2px 8px;
    border-radius: 4px;
}

.btn-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.btn-link:hover { text-decoration: underline; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--footer-bg, var(--surface));
}

.site-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px;
    text-align: center;
    color: var(--footer-text, var(--text-muted));
    font-size: 13px;
}

/* Products */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; padding: 20px 0; }
.product-card { background: var(--luperiq-surface, #fff); border: 1px solid var(--luperiq-border, #e2e8f0); border-radius: 8px; padding: 20px; transition: box-shadow 0.2s; }
.product-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.product-card h2 { font-size: 1.1rem; margin: 12px 0 8px; }
.product-card h2 a { color: inherit; text-decoration: none; }
.product-card h2 a:hover { color: var(--luperiq-primary, #3b82f6); }
.product-card-image { width: 100%; height: 180px; object-fit: cover; border-radius: 6px; }
.product-card-desc { color: var(--luperiq-muted, #64748b); font-size: 0.9rem; margin: 8px 0; }
.product-card-price { font-size: 1.25rem; font-weight: 700; color: var(--luperiq-primary, #3b82f6); }
.product-cat-badge { display: inline-block; background: var(--luperiq-primary, #3b82f6); color: #fff; font-size: 0.75rem; padding: 2px 8px; border-radius: 12px; margin: 4px 4px 0 0; }
.product-single { max-width: 800px; margin: 0 auto; padding: 20px; }
.product-single-image { width: 100%; max-height: 400px; object-fit: cover; border-radius: 8px; margin-bottom: 20px; }
.product-single-price { font-size: 1.5rem; font-weight: 700; color: var(--luperiq-primary, #3b82f6); margin: 16px 0; }
.product-description { line-height: 1.7; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-wrap { margin: 24px 0; }
.btn-wrap.align-center { text-align: center; }
.btn-wrap.align-right { text-align: right; }
.btn-wrap.align-left { text-align: left; }

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    line-height: 1.4;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface); }

/* ── Columns / Layout ────────────────────────────────────────── */
.columns {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Pricing Table ───────────────────────────────────────────── */
.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.plan {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 32px 24px;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}
.plan:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }

.plan.highlighted {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
    position: relative;
}
.plan.highlighted::before {
    content: "Most Popular";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    padding: 2px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.plan h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.price {
    font-size: 36px;
    font-weight: 800;
    color: var(--text);
    margin: 12px 0 20px;
}
.price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

.plan ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    text-align: left;
}
.plan li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: #475569;
}
.plan li:last-child { border-bottom: none; }

.plan .btn {
    width: 100%;
    text-align: center;
}

/* ── Stats Counter ───────────────────────────────────────────── */
.stat {
    text-align: center;
    padding: 16px;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Testimonial ─────────────────────────────────────────────── */
blockquote.testimonial {
    border-left: none;
    background: var(--surface);
    border-radius: 10px;
    padding: 28px;
    margin: 24px 0;
    font-style: normal;
    position: relative;
}
blockquote.testimonial::before {
    content: "\201C";
    font-size: 48px;
    color: var(--accent);
    position: absolute;
    top: 8px;
    left: 16px;
    line-height: 1;
}
blockquote.testimonial p {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 16px;
    padding-left: 24px;
}
blockquote.testimonial footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 24px;
}
blockquote.testimonial footer img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
blockquote.testimonial cite {
    font-style: normal;
    display: flex;
    flex-direction: column;
    font-size: 14px;
}
blockquote.testimonial cite strong { color: var(--text); }
blockquote.testimonial cite span { color: var(--text-muted); font-size: 13px; }

/* ── Accordion ───────────────────────────────────────────────── */
.accordion { margin: 24px 0; }
.accordion details {
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}
.accordion summary {
    padding: 14px 18px;
    font-weight: 600;
    cursor: pointer;
    background: var(--surface);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.accordion summary::after {
    content: "+";
    font-size: 18px;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.accordion details[open] summary::after {
    content: "\2212";
}
.accordion details > div {
    padding: 14px 18px;
    color: #475569;
    line-height: 1.7;
}

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs { margin: 24px 0; }
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
}
.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.tab-btn.active, .tab-btn:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.tab-panel { display: none; padding: 20px 0; }
.tab-panel.active { display: block; }

/* ── Gallery ─────────────────────────────────────────────────── */
.gallery {
    display: grid;
    gap: 8px;
    margin: 24px 0;
}
.gallery-grid { grid-template-columns: repeat(var(--cols, 3), 1fr); }
.gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin: 0;
}

/* ── Video Embed ─────────────────────────────────────────────── */
.video-embed {
    position: relative;
    width: 100%;
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
}
.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
.ratio-16-9 { padding-bottom: 56.25%; }
.ratio-4-3 { padding-bottom: 75%; }
.ratio-1-1 { padding-bottom: 100%; }

/* ── Before / After ──────────────────────────────────────────── */
.before-after {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0;
}
.before-after > div { text-align: center; }
.before-after img {
    width: 100%;
    border-radius: 6px;
    margin: 0 0 8px;
}
.before-after span {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Team Member ─────────────────────────────────────────────── */
.team-member {
    text-align: center;
    padding: 20px;
}
.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
}
.team-member h3 { font-size: 18px; margin-bottom: 4px; }
.team-member .role { color: var(--text-muted); font-size: 14px; margin-bottom: 8px; }
.team-member .social { display: flex; gap: 12px; justify-content: center; margin-top: 8px; }
.team-member .social a { color: var(--accent); text-decoration: none; font-size: 14px; }

/* ── Image Variants ──────────────────────────────────────────── */
figure { margin: 24px 0; }
figure.align-center { text-align: center; }
figure.align-center img { margin: 0 auto; display: block; }
figure.img-full img { width: 100%; }
figcaption { font-size: 13px; color: var(--text-muted); margin-top: 8px; text-align: center; }

/* ── Wide content (marketing pages) ──────────────────────────── */
.page-content .pricing-table,
.page-content .columns {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive */
@media (max-width: 640px) {
    .page-article h1 { font-size: 28px; }
    .page-content { font-size: 16px; }
    .site-main { padding: 32px 16px; }
    .site-header-inner { padding: 12px 16px; }
    .site-nav a { margin-left: 16px; font-size: 14px; }
    .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
    .before-after { grid-template-columns: 1fr; }
    .stat-number { font-size: 28px; }
    .price { font-size: 28px; }
    .plan { padding: 24px 16px; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
}
