/* Fusion — shared public site styles (landing, templates gallery) */
:root {
    --bg: #f7f8f2;
    --ink: #242716;           /* dark olive (logo) */
    --muted: #848678;         /* brand muted grey-green */
    /* Olive-green brand palette (from the Fusion logo) */
    --primary: #789029;       /* logo green */
    --primary-dark: #4d5c1a;  /* dark green */
    --secondary: #708826;     /* mid green */
    --accent: #a3b53f;        /* light lime accent */
    --teal: #5b7d1f;          /* deep leaf */
    --olive-dark: #242716;    /* darkest logo piece */
    --card: #ffffff;
    --border: #e6e8dc;
    /* Reusable gradients */
    --grad-brand: linear-gradient(120deg, #4d5c1a, #789029 60%, #a3b53f);
    --grad-cool: linear-gradient(120deg, #242716, #708826);
    --grad-warm: linear-gradient(120deg, #708826, #a3b53f);
    --grad-soft: linear-gradient(135deg, #eef2df, #e4ecd0 50%, #f3f6e6);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[x-cloak] { display: none !important; }
html, body { height: 100%; }
body { font-family: 'Cairo', system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.8;
    min-height: 100vh; display: flex; flex-direction: column; }
/* push footer to the bottom on short pages */
body > main, body > .wrap:not(.nav) { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }
a { text-decoration: none; color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ===== Buttons (unified system) ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 28px; border-radius: 14px; font-weight: 700; font-size: 16px;
    border: 1.5px solid transparent; cursor: pointer; font-family: inherit;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
    position: relative; background: var(--grad-brand); background-size: 180% 180%;
    color: #fff; box-shadow: 0 10px 26px rgba(120,144,41,.30);
    background-position: 0% 50%;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(77,92,26,.32); background-position: 100% 50%; }
.btn-ghost { color: var(--primary); border-color: var(--border); background: rgba(255,255,255,.6); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary-dark); box-shadow: 0 10px 24px rgba(120,144,41,.14); }
.btn-soft { background: rgba(120,144,41,.08); color: var(--primary); }
.btn-soft:hover { background: rgba(120,144,41,.14); transform: translateY(-2px); }

/* ===== Header ===== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(247,248,242,.9); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.site-header .nav { display: flex; align-items: center; gap: 20px; padding: 14px 0; }
/* ===== Logo (mark + wordmark) ===== */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-img { width: 44px; height: 44px; flex: none; object-fit: cover; object-position: center 32%;
  border-radius: 10px; mix-blend-mode: multiply; }
.logo-mark {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-brand); background-size: 160% 160%;
  box-shadow: 0 6px 16px rgba(120,144,41,.30);
  transition: transform .3s ease, background-position .4s ease;
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.05); background-position: 100% 50%; }
.logo-mark svg { width: 22px; height: 22px; color: #fff; }
.logo-text {
  font-family: 'Lalezar', 'Cairo', cursive; font-weight: 400; font-size: 30px; line-height: 1;
  letter-spacing: .5px;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
/* Scroll-reveal animation (CSS + tiny IntersectionObserver in pages) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.nav-links { display: flex; gap: 22px; margin-inline-end: auto; margin-inline-start: 12px; }
.nav-links a { font-weight: 600; color: var(--ink); font-size: 15px; position: relative; padding: 4px 0; }
.nav-links a:hover, .nav-links a.current { color: var(--primary); }
.nav-links a.current::after {
    content: ''; position: absolute; bottom: -2px; inset-inline: 0; height: 2px; background: var(--accent); border-radius: 2px;
}
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--primary); }

@media (max-width: 860px) {
    .nav-toggle { display: block; order: 3; }
    .nav-actions { gap: 6px; }
    .nav-actions .btn { padding: 9px 14px; font-size: 14px; }
    .nav-links {
        display: none; position: absolute; inset-inline: 0; top: 100%;
        flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--border);
        padding: 8px 24px; margin: 0; box-shadow: 0 12px 24px rgba(45,36,56,.1);
    }
    .nav-links.is-open { display: flex; }
    .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
    .nav-links a:last-child { border-bottom: none; }
}

/* ===== Footer ===== */
.site-footer { background: #242716; color: #d6cfe0; margin-top: 72px; }
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: 56px 24px 40px;
}
.footer-brand .logo-text {
  background: linear-gradient(120deg, #cfe09a, #a3b53f 55%, #dfe9c0);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
/* on the dark footer, show the logo on a white chip so it stays visible */
.footer-brand .logo-img { mix-blend-mode: normal; background: #fff; padding: 3px; }
.footer-brand p { color: #9ba088; margin: 14px 0 18px; max-width: 320px; }
.socials { display: flex; gap: 10px; }
.socials a {
    width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: #39411f; color: #fff; font-size: 16px; transition: background .15s;
}
.socials a:hover { background: var(--primary); }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.footer-col a { display: block; color: #9ba088; padding: 5px 0; font-size: 15px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #39411f; }
.footer-bottom .wrap {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 18px 24px; font-size: 14px; color: #9ba088;
}
.footer-legal a:hover { color: #fff; }

@media (max-width: 860px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding: 44px 22px 32px; }
    .footer-brand { grid-column: 1 / -1; }
    .site-footer { margin-top: 48px; }
}
@media (max-width: 600px) {
    /* smaller, tappable header on phones */
    .logo-mark { width: 32px; height: 32px; }
    .logo-mark svg { width: 18px; height: 18px; }
    .logo-text { font-size: 25px; }
    .site-header .nav { gap: 12px; padding: 11px 0; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-brand p { margin-inline: auto; }
    .socials { justify-content: center; }
    .footer-bottom .wrap { flex-direction: column; text-align: center; }
}
