/* ==========================================================================
   ManagedAgent AI — WordPress theme stylesheet
   Soft, warm, friendly tokens (orange + grey + teal). HSL-based design system.
   ========================================================================== */

:root {
	--background: hsl(30 25% 97%);
	--foreground: hsl(220 20% 18%);
	--card: hsl(30 20% 99%);
	--muted: hsl(30 15% 94%);
	--muted-foreground: hsl(220 10% 50%);
	--border: hsl(30 15% 90%);
	--primary: hsl(24 90% 55%);
	--primary-hover: hsl(24 90% 50%);
	--primary-foreground: hsl(0 0% 100%);
	--accent: hsl(195 60% 48%);
	--accent-foreground: hsl(0 0% 100%);
	--warm-light: hsl(30 95% 95%);
	--soft-cream: hsl(35 30% 96%);

	--gradient-hero: linear-gradient(135deg, hsl(30 95% 95%), hsl(0 0% 100%), hsl(195 50% 96%));
	--gradient-primary: linear-gradient(135deg, hsl(24 90% 55%), hsl(18 85% 50%));
	--gradient-accent: linear-gradient(135deg, hsl(195 60% 48%), hsl(200 65% 42%));

	--shadow-soft: 0 4px 24px -4px hsl(24 90% 55% / 0.12);
	--shadow-card: 0 2px 16px -2px hsl(220 20% 18% / 0.06);
	--shadow-elevated: 0 8px 32px -8px hsl(220 20% 18% / 0.1);

	--radius: 0.75rem;
	--radius-lg: 1rem;
	--radius-xl: 1.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, sans-serif;
	color: var(--foreground);
	background: var(--background);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary-hover); }
h1,h2,h3,h4,h5,h6 { font-family: 'Space Grotesk', system-ui, sans-serif; color: var(--foreground); margin: 0 0 .5em; line-height: 1.15; font-weight: 700; }
.screen-reader-text { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff; padding: .5rem 1rem; z-index: 10000; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* Layout */
.ma-container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.ma-narrow { max-width: 800px; }
.ma-narrower { max-width: 720px; margin: 0 auto; }
.ma-text-center { text-align: center; }

.ma-section { padding: 5rem 0; }
.ma-section-tight { padding: 2.5rem 0; }
.ma-bg-hero { background: var(--gradient-hero); }
.ma-bg-soft { background: var(--soft-cream); }

.ma-section-head { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.ma-section-head h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.ma-section-head p { color: var(--muted-foreground); font-size: 1.125rem; }

.ma-page-header { margin-bottom: 3rem; }
.ma-page-title { font-size: clamp(2.25rem, 5vw, 3.75rem); }
.ma-page-sub { color: var(--muted-foreground); font-size: 1.125rem; }

/* Gradient text */
.ma-text-gradient { background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ma-text-gradient-accent { background: var(--gradient-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.ma-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: .95rem;
	padding: .65rem 1.25rem; border-radius: var(--radius); border: 1px solid transparent;
	cursor: pointer; transition: all .2s ease; text-decoration: none; line-height: 1;
}
.ma-btn-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-soft); }
.ma-btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-elevated); color: #fff; }
.ma-btn-outline { background: hsl(24 90% 55% / .05); color: var(--foreground); border-color: hsl(24 90% 55% / .25); }
.ma-btn-outline:hover { background: hsl(24 90% 55% / .12); border-color: hsl(24 90% 55% / .45); color: var(--foreground); }
.ma-btn-ghost { background: transparent; color: var(--muted-foreground); }
.ma-btn-ghost:hover { background: var(--muted); color: var(--foreground); }
.ma-btn-lg { padding: .85rem 1.6rem; font-size: 1rem; border-radius: var(--radius-lg); }
.ma-btn-xl { padding: 1rem 1.85rem; font-size: 1.05rem; border-radius: var(--radius-lg); }
.ma-btn-block { display: flex; width: 100%; }

/* Pills / chips */
.ma-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .85rem; border-radius: 999px; font-size: .85rem; font-weight: 500; margin-bottom: 1.25rem; }
.ma-pill-primary { background: hsl(24 90% 55% / .1); color: var(--primary); border: 1px solid hsl(24 90% 55% / .25); }
.ma-pill-accent { background: hsl(195 60% 48% / .1); color: var(--accent); border: 1px solid hsl(195 60% 48% / .25); }
.ma-chip { background: var(--muted); color: var(--muted-foreground); border: 1px solid var(--border); padding: .4rem .8rem; border-radius: 999px; font-size: .8rem; cursor: pointer; transition: all .2s; }
.ma-chip:hover { background: hsl(24 90% 55% / .1); color: var(--primary); border-color: hsl(24 90% 55% / .3); }

/* Navbar */
.ma-navbar { position: sticky; top: 0; z-index: 100; background: hsl(30 25% 97% / .85); backdrop-filter: blur(12px); border-bottom: 1px solid hsl(30 15% 90% / .6); }
.ma-navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.ma-brand .ma-logo, .ma-brand img { height: 2rem; width: auto; }
.ma-menu { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.ma-menu li { list-style: none; }
.ma-menu a { padding: .5rem 1rem; border-radius: .5rem; font-size: .9rem; font-weight: 500; color: var(--muted-foreground); }
.ma-menu a:hover, .ma-menu .current-menu-item a { background: var(--muted); color: var(--foreground); }
.ma-nav-cta { display: flex; gap: .5rem; align-items: center; }
.ma-nav-toggle { display: none; background: none; border: none; flex-direction: column; gap: 4px; padding: .5rem; cursor: pointer; }
.ma-nav-toggle span { width: 22px; height: 2px; background: var(--foreground); border-radius: 2px; }
.ma-mobile-menu { padding: 1rem 1.25rem; border-top: 1px solid var(--border); background: var(--background); }
.ma-mobile-menu .ma-mobile-list, .ma-mobile-menu ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.ma-mobile-menu a { display: block; padding: .65rem .75rem; border-radius: .5rem; color: var(--foreground); font-weight: 500; }
.ma-mobile-menu a:hover { background: var(--muted); }
.ma-mobile-cta { display: flex; flex-direction: column; gap: .5rem; }

@media (max-width: 860px) {
	.ma-nav-primary, .ma-nav-cta { display: none; }
	.ma-nav-toggle { display: inline-flex; }
}

/* Hero */
.ma-hero { position: relative; overflow: hidden; padding: 4rem 0 5rem; min-height: 80vh; display: flex; align-items: center; }
.ma-hero-bg { position: absolute; inset: 0; background: var(--gradient-hero); z-index: -3; }
.ma-hero-blob { position: absolute; border-radius: 50%; filter: blur(120px); z-index: -2; }
.ma-hero-blob-1 { top: -200px; right: -150px; width: 500px; height: 500px; background: hsl(24 90% 55% / .1); }
.ma-hero-blob-2 { bottom: -200px; left: -150px; width: 450px; height: 450px; background: hsl(195 60% 48% / .08); }
.ma-hero-grid { position: absolute; inset: 0; opacity: .04; background-image: radial-gradient(circle, hsl(220 20% 18%) 1px, transparent 1px); background-size: 32px 32px; z-index: -1; }
.ma-hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; position: relative; }
.ma-hero-title { font-size: clamp(2.5rem, 5.5vw, 4.25rem); line-height: 1.08; margin-bottom: 1.25rem; }
.ma-hero-sub { font-size: 1.15rem; color: var(--muted-foreground); margin-bottom: 2rem; max-width: 32rem; }
.ma-hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.ma-hero-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; color: var(--muted-foreground); font-size: .9rem; }
.ma-hero-checks li { color: var(--accent); }
.ma-hero-checks li::first-letter { margin-right: .25rem; }

@media (max-width: 900px) {
	.ma-hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* Terminal */
.ma-terminal { background: hsl(30 20% 99% / .9); backdrop-filter: blur(8px); border: 1px solid hsl(30 15% 90% / .8); border-radius: var(--radius-xl); box-shadow: var(--shadow-elevated); overflow: hidden; }
.ma-terminal-bar { display: flex; align-items: center; gap: .5rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--border); background: hsl(30 15% 94% / .5); }
.ma-terminal-bar .dot { width: 12px; height: 12px; border-radius: 50%; opacity: .5; }
.dot-r { background: hsl(0 84% 60%); }
.dot-y { background: hsl(28 80% 70%); }
.dot-g { background: hsl(195 60% 48%); }
.ma-terminal-title { margin-left: .5rem; font-family: ui-monospace, monospace; font-size: .8rem; color: var(--muted-foreground); }
.ma-terminal-body { padding: 1.5rem; font-family: ui-monospace, monospace; font-size: .9rem; min-height: 180px; }
.ma-terminal-line { display: flex; gap: .5rem; align-items: flex-start; }
.ma-arrow { color: var(--primary); font-weight: 700; }
.ma-caret { display: inline-block; width: 2px; height: 1rem; background: var(--primary); animation: blink 1s infinite; vertical-align: middle; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.ma-terminal-resp { padding-left: 1.25rem; margin-top: .75rem; line-height: 2; }
.ma-terminal-resp > div { color: var(--accent); }
.ma-terminal-resp .ma-resp-ready { color: var(--primary); font-weight: 600; }

/* Stats */
.ma-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.75rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); }
.ma-stat { text-align: center; }
.ma-stat-num { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 2rem; color: var(--primary); }
.ma-stat-label { color: var(--muted-foreground); font-size: .85rem; }
@media (max-width: 700px) { .ma-stats { grid-template-columns: repeat(2, 1fr); } }

/* Grid + cards */
.ma-grid { display: grid; gap: 1.5rem; }
.ma-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ma-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .ma-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .ma-grid-3, .ma-grid-4 { grid-template-columns: 1fr; } }

.ma-card { background: var(--card); border: 1px solid hsl(30 15% 90% / .6); border-radius: var(--radius-xl); padding: 1.5rem; box-shadow: var(--shadow-card); transition: transform .2s, box-shadow .2s; }
.ma-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-elevated); }

.ma-feature .ma-feature-icon { width: 48px; height: 48px; border-radius: var(--radius); background: hsl(24 90% 55% / .1); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1rem; }
.ma-feature h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.ma-feature p { color: var(--muted-foreground); font-size: .9rem; margin: 0 0 .75rem; }

.ma-bullet-list { list-style: none; padding: 0; margin: 0; }
.ma-bullet-list li { color: var(--muted-foreground); font-size: .85rem; padding: .15rem 0 .15rem 1rem; position: relative; }
.ma-bullet-list li::before { content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--primary); transform: translateY(-50%); }
.ma-check-list li::before { display: none; }
.ma-check-list li { padding-left: 0; color: var(--foreground); font-size: .9rem; padding: .25rem 0; }

/* Workflow steps */
.ma-step { padding: 1.5rem; text-align: left; }
.ma-step-num { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 700; color: var(--primary); opacity: .35; margin-bottom: .5rem; }
.ma-step h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.ma-step p { color: var(--muted-foreground); font-size: .9rem; margin: 0; }

/* Testimonials */
.ma-testimonial p { font-size: .95rem; color: var(--foreground); margin: .75rem 0 1rem; }
.ma-stars { color: hsl(38 90% 55%); letter-spacing: 2px; }
.ma-testimonial-meta { display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; }
.ma-testimonial-meta strong { color: var(--foreground); }
.ma-testimonial-meta span { color: var(--muted-foreground); }

/* Pricing */
.ma-pricing { max-width: 1080px; margin: 0 auto; }
.ma-price-card { padding: 2rem 1.75rem; position: relative; display: flex; flex-direction: column; }
.ma-price-card.is-popular { border-color: hsl(24 90% 55% / .35); box-shadow: var(--shadow-elevated); transform: scale(1.02); }
.ma-popular-badge { position: absolute; top: -.85rem; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--primary-foreground); font-size: .75rem; padding: .25rem .75rem; border-radius: 999px; font-weight: 500; }
.ma-price-name { font-size: 1.25rem; margin-bottom: .35rem; }
.ma-price-desc { color: var(--muted-foreground); font-size: .9rem; margin-bottom: 1rem; }
.ma-price-num { margin: 0 0 1.5rem; }
.ma-price-num span { font-family: 'Space Grotesk', sans-serif; font-size: 2.5rem; font-weight: 700; color: var(--foreground); }
.ma-price-num small { color: var(--muted-foreground); font-size: .9rem; }
.ma-price-card .ma-bullet-list { margin-bottom: 1.75rem; flex: 1; }

/* Builder form */
.ma-builder-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; box-shadow: var(--shadow-elevated); }
.ma-builder-input { width: 100%; min-height: 144px; padding: 1rem; background: hsl(30 15% 94% / .5); border: 1px solid var(--border); border-radius: var(--radius); font-family: inherit; font-size: .95rem; resize: vertical; transition: all .2s; }
.ma-builder-input:focus { outline: none; border-color: hsl(24 90% 55% / .5); box-shadow: 0 0 0 3px hsl(24 90% 55% / .15); }
.ma-builder-presets { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.ma-builder-actions { display: flex; justify-content: flex-end; }
.ma-builder-success { margin-top: 1rem; padding: .85rem; background: hsl(195 60% 48% / .1); color: var(--accent); border: 1px solid hsl(195 60% 48% / .25); border-radius: var(--radius); text-align: center; font-weight: 500; }

/* FAQ */
.ma-faq { display: flex; flex-direction: column; gap: .75rem; }
.ma-faq-item { background: var(--card); border: 1px solid hsl(30 15% 90% / .6); border-radius: var(--radius); padding: 1rem 1.5rem; box-shadow: var(--shadow-card); }
.ma-faq-item summary { font-family: 'Space Grotesk', sans-serif; font-weight: 600; cursor: pointer; padding: .35rem 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.ma-faq-item summary::-webkit-details-marker { display: none; }
.ma-faq-item summary::after { content: "+"; color: var(--primary); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.ma-faq-item[open] summary::after { content: "−"; }
.ma-faq-body { color: var(--muted-foreground); padding-top: .75rem; line-height: 1.65; }

/* CTA section */
.ma-cta { background: var(--gradient-hero); }
.ma-cta h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 1rem; }
.ma-cta p { color: var(--muted-foreground); margin-bottom: 1.75rem; font-size: 1.1rem; }

/* Posts/blog */
.ma-post-card { padding: 0; overflow: hidden; }
.ma-post-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.ma-card-body { padding: 1.5rem; }
.ma-card-title { font-size: 1.15rem; margin: 0 0 .35rem; }
.ma-card-title a { color: var(--foreground); }
.ma-card-title a:hover { color: var(--primary); }
.ma-card-meta { color: var(--muted-foreground); font-size: .8rem; margin-bottom: .75rem; }
.ma-card-excerpt { color: var(--muted-foreground); font-size: .92rem; margin-bottom: 1rem; }
.ma-link { color: var(--primary); font-weight: 500; }
.ma-pagination { margin-top: 3rem; text-align: center; }
.ma-prose { font-size: 1.05rem; line-height: 1.75; color: var(--foreground); }
.ma-prose img { border-radius: var(--radius); margin: 1.5rem 0; }
.ma-prose h2, .ma-prose h3 { margin-top: 2rem; }
.ma-prose a { text-decoration: underline; }

/* Search form */
.ma-search-form { display: flex; gap: .5rem; }
.ma-input { flex: 1; padding: .65rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }

/* Footer */
.ma-footer { background: hsl(220 20% 18%); color: hsl(30 15% 94% / .6); padding: 0; }
.ma-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; padding: 3.5rem 1.25rem 2rem; }
@media (max-width: 800px) { .ma-footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .ma-footer-grid { grid-template-columns: 1fr; } }
.ma-footer h4 { color: hsl(30 25% 97%); font-size: .9rem; margin-bottom: 1rem; }
.ma-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.ma-footer ul a { color: hsl(30 15% 94% / .55); font-size: .9rem; }
.ma-footer ul a:hover { color: var(--primary); }
.ma-footer-brand-link { display: inline-flex; align-items: center; gap: .5rem; color: hsl(30 25% 97%); font-family: 'Space Grotesk', sans-serif; font-weight: 700; margin-bottom: .85rem; }
.ma-footer-mark { width: 28px; height: 28px; border-radius: .5rem; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.ma-footer-accent { color: var(--primary); }
.ma-footer-tag { color: hsl(30 15% 94% / .5); font-size: .9rem; line-height: 1.6; max-width: 300px; }
.ma-footer-bottom { border-top: 1px solid hsl(30 15% 94% / .08); padding: 1.25rem 0; text-align: center; color: hsl(30 15% 94% / .4); font-size: .85rem; }
