/* AI Ads Studio — shared stylesheet
   Used by index.html (English) and index-ar.html (Arabic).
   Logical properties (margin-inline, padding-inline, start/end) are used
   throughout so the same rules serve both LTR and RTL without overrides. */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-soft: #eef2ff;
    --secondary: #0891b2;
    --text: #111827;
    --text-muted: #4b5563;
    --text-faint: #6b7280;
    --border: #e5e7eb;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --bg-deep: #111827;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --shadow: 0 1px 3px rgba(17, 24, 39, .08), 0 1px 2px rgba(17, 24, 39, .04);
    --shadow-lg: 0 12px 32px rgba(79, 70, 229, .12);
    --maxw: 1140px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[lang="ar"] {
    --font: 'Cairo', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--primary); }

img { max-width: 100%; height: auto; }

.container {
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.skip-link {
    position: absolute;
    inset-inline-start: -9999px;
    top: 0;
    background: var(--primary);
    color: #fff;
    padding: .75rem 1.25rem;
    z-index: 200;
}
.skip-link:focus { inset-inline-start: 0; }

/* ---------- Header ---------- */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: .875rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -.01em;
    flex-shrink: 0;
}

.brand img { width: 34px; height: 34px; display: block; }

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-inline-start: auto;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: .9375rem;
    font-weight: 500;
}
.nav-links a:hover { color: var(--primary); }

.lang-switch {
    font-size: .875rem;
    font-weight: 600;
    padding: .375rem .75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted) !important;
}
.lang-switch:hover { border-color: var(--primary); color: var(--primary) !important; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: .8125rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .9375rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, background .2s ease, border-color .2s ease;
    white-space: nowrap;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-on-dark { background: #fff; color: var(--primary); }
.btn-on-dark:hover { transform: translateY(-1px); }

.btn-sm { padding: .5625rem 1rem; font-size: .875rem; }

/* ---------- Hero ---------- */

.hero {
    padding: 4.5rem 0 3.5rem;
    background:
        radial-gradient(900px 380px at 50% -8%, rgba(79, 70, 229, .10), transparent 70%),
        var(--bg);
    text-align: center;
}

.hero-inner { max-width: 760px; margin-inline: auto; }

.eyebrow {
    display: inline-block;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-soft);
    padding: .375rem .875rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.1rem);
    font-weight: 800;
    letter-spacing: -.025em;
    margin-bottom: 1.125rem;
}

.hero .lede {
    font-size: clamp(1.0625rem, 2vw, 1.1875rem);
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-note {
    margin-top: 1.25rem;
    font-size: .875rem;
    color: var(--text-faint);
}

/* ---------- Sections ---------- */

section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-head { max-width: 680px; margin-inline: auto; text-align: center; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.625rem, 3.5vw, 2.125rem); letter-spacing: -.02em; }
.section-head p { color: var(--text-muted); margin: 0; }

/* ---------- Cards ---------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}

.card h3 { font-size: 1.0625rem; margin-bottom: .5rem; }
.card p { color: var(--text-muted); font-size: .9375rem; margin: 0; }

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: .5rem;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
    font-size: .9375rem;
    margin-bottom: .875rem;
}

/* ---------- Google data disclosure ---------- */

.disclosure {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    max-width: 880px;
    margin-inline: auto;
    box-shadow: var(--shadow);
}

.disclosure h2 { font-size: clamp(1.375rem, 3vw, 1.75rem); margin-bottom: .75rem; }

.data-list { list-style: none; margin: 1.5rem 0; padding: 0; }

.data-list li {
    padding-block: .875rem;
    border-top: 1px solid var(--border);
    font-size: .9375rem;
    color: var(--text-muted);
}
.data-list li:last-child { border-bottom: 1px solid var(--border); }
.data-list strong { color: var(--text); display: block; margin-bottom: .1875rem; }

.limited-use {
    background: var(--bg-alt);
    border-inline-start: 3px solid var(--primary);
    border-radius: .5rem;
    padding: 1rem 1.25rem;
    font-size: .9063rem;
    color: var(--text-muted);
    margin: 0;
}

/* ---------- Pricing ---------- */

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; align-items: start; }

.plan {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.875rem 1.5rem;
    text-align: center;
    background: var(--bg);
}

.plan.featured { border-color: var(--primary); box-shadow: var(--shadow-lg); }

.plan-tag {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--primary);
}

.price { font-size: 2.25rem; font-weight: 800; letter-spacing: -.02em; margin: .5rem 0 1.25rem; }
.price span { font-size: .9375rem; font-weight: 500; color: var(--text-faint); }

.plan ul { list-style: none; margin: 0 0 1.75rem; padding: 0; text-align: start; }
.plan li { padding-block: .5rem; font-size: .9063rem; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.plan li:last-child { border-bottom: none; }

/* ---------- CTA ---------- */

.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    text-align: center;
    padding: 3.5rem 0;
}
.cta h2 { font-size: clamp(1.625rem, 3.5vw, 2.125rem); }
.cta p { opacity: .92; max-width: 560px; margin-inline: auto; margin-bottom: 1.75rem; }

/* ---------- Footer ---------- */

footer { background: var(--bg-deep); color: #d1d5db; padding: 3rem 0 1.75rem; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand { display: inline-flex; align-items: center; gap: .625rem; color: #fff; font-weight: 800; font-size: 1.0625rem; text-decoration: none; }
.footer-brand img { width: 30px; height: 30px; }
.footer-about { font-size: .875rem; color: #9ca3af; margin-top: .75rem; max-width: 34ch; }

footer h4 { color: #fff; font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .875rem; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: .5rem; }
footer a { color: #d1d5db; text-decoration: none; font-size: .9063rem; }
footer a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .8438rem;
    color: #9ca3af;
}
.footer-bottom p { margin: 0; }

/* ---------- Legal pages ---------- */

.page-head {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 3rem 0 2.5rem;
    text-align: center;
}
.page-head h1 { font-size: clamp(1.875rem, 4vw, 2.5rem); letter-spacing: -.02em; margin-bottom: .5rem; }
.page-head p { color: var(--text-muted); margin: 0; }

.legal { max-width: 780px; margin-inline: auto; padding-block: 3rem; }
.legal h2 { font-size: 1.3125rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.legal section:first-of-type h2 { margin-top: 0; padding-top: 0; border-top: none; }
.legal h3 { font-size: 1.0313rem; margin-top: 1.5rem; color: var(--text); }
.legal p, .legal li { color: var(--text-muted); }
.legal ul { padding-inline-start: 1.25rem; margin-bottom: 1rem; }
.legal li { margin-bottom: .375rem; }
.legal code { background: var(--bg-alt); padding: .125rem .375rem; border-radius: .25rem; font-size: .875em; word-break: break-all; }

.meta-box {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-size: .9063rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}
.meta-box p { margin: 0; }

.callout {
    background: var(--primary-soft);
    border-inline-start: 3px solid var(--primary);
    border-radius: .5rem;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
}
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

.callout-warn {
    background: #fffbeb;
    border-inline-start-color: #f59e0b;
}

.legal table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9063rem;
    margin-bottom: 1.25rem;
}
.legal th, .legal td {
    text-align: start;
    padding: .75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.legal th { color: var(--text); font-weight: 600; background: var(--bg-alt); }
.legal td { color: var(--text-muted); }
.table-scroll { overflow-x: auto; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .nav-links { gap: 1rem; }
    .nav-links li:not(.nav-keep) { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
    .hero { padding-top: 3rem; }
    .hero-actions .btn { width: 100%; }
    .footer-grid { grid-template-columns: 1fr; }
}
