/* 
 مدهوش v2 — Shared page styles (nav + footer + page-hero + prose)
 Used by all non-homepage v2 pages.
 */

/* Nav (matches index.html embedded nav) */
.nav {
 position: sticky; top: 0; z-index: 100;
 backdrop-filter: blur(18px) saturate(1.4);
 -webkit-backdrop-filter: blur(18px) saturate(1.4);
 background: var(--bg-overlay);
 border-bottom: 1px solid transparent;
 transition: border-color var(--dur-base) var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-left { display: flex; align-items: center; gap: var(--s-8); }
.nav-right { display: flex; align-items: center; gap: var(--s-3); }
.brand {
 display: inline-flex; align-items: center; gap: 10px;
 font-weight: 800; font-size: var(--text-md); color: var(--fg);
 letter-spacing: -0.01em;
}
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.brand-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--sig-glow); }
.nav-links { display: flex; align-items: center; gap: var(--s-6); font-size: var(--text-sm); }
.nav-links a {
 color: var(--fg-muted); font-weight: 500;
 transition: color var(--dur-fast) var(--ease);
 padding: 6px 2px;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a.is-active { color: var(--fg); }
.nav-links .nav-link-agent {
 display: inline-flex; align-items: center; gap: 6px;
 color: var(--accent);
 padding: 6px 12px; border-radius: var(--r-full);
 background: color-mix(in oklch, var(--accent) 10%, transparent);
 border: 1px solid color-mix(in oklch, var(--accent) 22%, transparent);
 font-weight: 600;
 transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.nav-links .nav-link-agent:hover { background: color-mix(in oklch, var(--accent) 18%, transparent); border-color: color-mix(in oklch, var(--accent) 50%, transparent); color: var(--accent); }
.theme-toggle {
 width: 40px; height: 40px;
 display: inline-flex; align-items: center; justify-content: center;
 border-radius: var(--r-full); color: var(--fg-muted);
 border: 1px solid transparent;
 transition: background-color var(--dur-fast) var(--ease),
 color var(--dur-fast) var(--ease),
 border-color var(--dur-fast) var(--ease),
 transform var(--dur-instant) var(--ease-out);
}
.theme-toggle:hover { background: var(--bg-raised); color: var(--fg); border-color: var(--border); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle svg { width: 18px; height: 18px; }
@media (max-width: 768px) { .nav-links { display: none; } .nav-inner { height: 56px; } }

/* Page hero (used by content pages) */
.page-hero {
 position: relative; isolation: isolate;
 padding: clamp(56px, 9vw, 96px) 0 clamp(40px, 6vw, 64px);
 text-align: center;
}
.page-hero::before {
 content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
 background:
 radial-gradient(50% 80% at 20% 0%, color-mix(in oklch, var(--sig) 14%, transparent), transparent 60%),
 radial-gradient(50% 80% at 80% 30%, color-mix(in oklch, var(--t-indigo) 12%, transparent), transparent 60%);
}
.page-hero-eyebrow {
 display: inline-flex; align-items: center; gap: 8px;
 font-size: var(--text-xs); font-weight: 600; color: var(--accent);
 padding: 6px 14px; border-radius: var(--r-full);
 border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
 background: color-mix(in oklch, var(--accent) 8%, transparent);
 margin-bottom: var(--s-5);
}
.page-hero-eyebrow .pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.page-hero h1 {
 font-size: clamp(2rem, 5vw, var(--text-5xl));
 font-weight: 900; line-height: 1.1; letter-spacing: -0.025em;
 color: var(--fg); margin-bottom: var(--s-4); max-width: 22ch;
 margin-inline: auto;
}
.page-hero h1 em {
 font-style: normal;
 background: linear-gradient(135deg, var(--sig), var(--sig-glow));
 -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-hero p {
 font-size: clamp(1rem, 1.4vw, var(--text-md));
 color: var(--fg-muted); line-height: 1.8;
 max-width: 40em; margin: 0 auto;
}

/* Prose (for static page content from CMS) */
.prose {
 max-width: 68ch; margin: 0 auto;
 font-size: var(--text-md);
 line-height: 1.85; color: var(--fg);
 padding-block: var(--s-12);
}
.prose > * + * { margin-top: var(--s-5); }
.prose h1, .prose h2, .prose h3 {
 font-weight: 800; letter-spacing: -0.018em; color: var(--fg);
 line-height: 1.25;
}
.prose h1 { font-size: var(--text-3xl); margin-top: var(--s-12); }
.prose h2 { font-size: var(--text-2xl); margin-top: var(--s-10); padding-top: var(--s-4); border-top: 1px solid var(--border); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.prose h3 { font-size: var(--text-xl); margin-top: var(--s-8); color: var(--fg); }
.prose h4 { font-size: var(--text-md); font-weight: 700; margin-top: var(--s-6); color: var(--fg); }
.prose p { color: var(--fg-muted); }
.prose strong { color: var(--fg); font-weight: 700; }
.prose a {
 color: var(--accent); text-decoration: underline;
 text-decoration-color: color-mix(in oklch, var(--accent) 40%, transparent);
 text-underline-offset: 3px;
 transition: text-decoration-color var(--dur-fast) var(--ease);
}
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-inline-start: var(--s-6); color: var(--fg-muted); }
.prose ul { list-style: none; }
.prose ul > li { position: relative; padding-inline-start: var(--s-4); }
.prose ul > li::before {
 content: ''; position: absolute; right: 0; top: 0.75em;
 width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.prose ol { list-style: decimal; }
.prose ol > li::marker { color: var(--accent); font-weight: 700; }
.prose li + li { margin-top: var(--s-2); }
.prose blockquote {
 border-inline-start: 3px solid var(--accent);
 padding: var(--s-3) var(--s-5);
 background: var(--bg-surface);
 border-radius: 0 var(--r) var(--r) 0;
 color: var(--fg);
 font-style: italic;
}
.prose code {
 background: var(--bg-raised);
 padding: 2px 8px; border-radius: var(--r-sm);
 font-family: var(--font-mono); font-size: 0.9em;
 color: var(--accent);
}
.prose pre {
 background: var(--bg-surface);
 padding: var(--s-4); border-radius: var(--r-md);
 overflow-x: auto;
 border: 1px solid var(--border);
}
.prose pre code { background: none; color: var(--fg); padding: 0; }
.prose hr { border: none; height: 1px; background: var(--border); margin: var(--s-8) 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--r-md); border: 1px solid var(--border); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.prose th, .prose td { padding: var(--s-3); text-align: start; border-bottom: 1px solid var(--border); }
.prose th { font-weight: 700; color: var(--fg); background: var(--bg-surface); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: var(--s-20) 0 var(--s-10); margin-top: var(--s-16); background: color-mix(in oklch, var(--bg-surface) 80%, transparent); position: relative; isolation: isolate; }
.footer::before {
 content: ''; position: absolute; inset: 0; z-index: -1;
 background: radial-gradient(50% 100% at 50% 0%, color-mix(in oklch, var(--sig) 6%, transparent), transparent 50%);
}
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--s-12); margin-bottom: var(--s-16); }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: span 2; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } .footer-brand { grid-column: auto; } }
.footer-brand p { color: var(--fg-muted); font-size: var(--text-sm); line-height: 1.7; max-width: 28em; margin-top: var(--s-4); margin-bottom: var(--s-5); }
.footer-social { display: flex; gap: var(--s-2); }
.footer-social a {
 width: 36px; height: 36px; border-radius: var(--r-full);
 display: inline-flex; align-items: center; justify-content: center;
 color: var(--fg-muted); border: 1px solid var(--border);
 transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.footer-social a:hover { color: var(--fg); border-color: var(--border-strong); background: var(--bg-raised); }
.footer-social svg { width: 16px; height: 16px; }
.footer-col-title { font-size: var(--text-sm); font-weight: 700; color: var(--fg); margin-bottom: var(--s-4); letter-spacing: -0.005em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--s-2); }
.footer-col a { font-size: var(--text-sm); color: var(--fg-muted); transition: color var(--dur-fast) var(--ease); }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; padding-top: var(--s-6); border-top: 1px solid var(--border); }
.footer-copy { font-size: var(--text-xs); color: var(--fg-subtle); }
.footer-legal { display: flex; gap: var(--s-5); font-size: var(--text-xs); }
.footer-legal a { color: var(--fg-subtle); }
.footer-legal a:hover { color: var(--fg-muted); }

/* Skip link */
.skip-link {
 position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
 background: var(--accent); color: var(--on-accent);
 padding: 10px 20px; border-radius: 0 0 var(--r) var(--r);
 font-weight: 600; z-index: 9999;
 transition: top var(--dur-base) var(--ease);
}
.skip-link:focus { top: 0; }
