/* AME Tools — site styles. Themes: light / dark / magic (data-theme on <html>). RTL via dir="rtl" (logical properties). */
:root, [data-theme="light"] {
  --bg:#f5f7fb; --bg2:#ffffff; --card:#ffffff; --raised:#eef2f8; --line:#dde3ec; --text:#141b26; --muted:#5b6778;
  --accent:#2f5bd3; --accent2:#18a0a8; --on:#ffffff; --ok:#1f9d6b; --glow:rgba(47,91,211,.18);
  --hero:radial-gradient(1200px 500px at 15% -10%, #dfe8ff 0%, transparent 60%), radial-gradient(900px 500px at 100% 0%, #d9f4f2 0%, transparent 55%);
}
[data-theme="dark"] {
  --bg:#0d1118; --bg2:#121823; --card:#161d2a; --raised:#1d2635; --line:#273244; --text:#e8edf5; --muted:#93a0b4;
  --accent:#6e8bff; --accent2:#3cc6c9; --on:#0b1020; --ok:#3ccb8f; --glow:rgba(110,139,255,.22);
  --hero:radial-gradient(1100px 520px at 10% -10%, #1b2a55 0%, transparent 60%), radial-gradient(900px 520px at 100% 0%, #0f3a44 0%, transparent 55%);
}
[data-theme="magic"] {
  --bg:#120c22; --bg2:#170f2c; --card:#1d1438; --raised:#271b48; --line:#382a64; --text:#f1ebff; --muted:#ab9fd0;
  --accent:#c77dff; --accent2:#ff7ac8; --on:#1a0f2e; --ok:#4fe0b0; --glow:rgba(199,125,255,.25);
  --hero:radial-gradient(1100px 520px at 10% -10%, #3b1a6e 0%, transparent 60%), radial-gradient(900px 520px at 100% 0%, #5a1a5e 0%, transparent 55%);
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--bg); color:var(--text); font:16px/1.6 Inter, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing:antialiased; transition:background .25s,color .25s; }
[dir="rtl"] body { font-family:Cairo, Inter, "Segoe UI", Tahoma, sans-serif; }
a { color:var(--accent); text-decoration:none; }
img { max-width:100%; display:block; }
.wrap { max-width:1180px; margin:0 auto; padding:0 16px; }
.narrow { max-width:820px; }

/* nav */
.nav { position:sticky; top:0; z-index:20; backdrop-filter:blur(14px); background:color-mix(in srgb, var(--bg) 82%, transparent); border-bottom:1px solid var(--line); }
.nav-in { display:flex; align-items:center; gap:20px; height:64px; }
.logo { display:flex; align-items:center; gap:8px; font-weight:800; font-size:18px; color:var(--text); }
.logo .mark { background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; border-radius:9px; padding:3px 7px; font-size:13px; letter-spacing:.5px; }
.links { display:flex; gap:22px; margin-inline-start:12px; }
.links a { color:var(--muted); font-weight:500; font-size:15px; }
.links a:hover { color:var(--text); }
.ctrls { display:flex; align-items:center; gap:10px; margin-inline-start:auto; }
.seg { display:flex; background:var(--raised); border:1px solid var(--line); border-radius:10px; padding:3px; }
.seg button, .lang { border:0; background:transparent; color:var(--muted); width:32px; height:28px; border-radius:7px; cursor:pointer; font-size:14px; }
.seg button.on { background:var(--accent); color:var(--on); }
.lang { background:var(--raised); border:1px solid var(--line); width:36px; height:36px; border-radius:10px; font-weight:700; color:var(--text); }

/* buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; border-radius:12px; padding:12px 20px; font-weight:600; border:1px solid var(--line); color:var(--text); background:var(--raised); cursor:pointer; transition:transform .15s, box-shadow .15s; font-size:15px; }
.btn:hover { transform:translateY(-1px); }
.btn.primary { background:linear-gradient(135deg,var(--accent),color-mix(in srgb,var(--accent) 70%,var(--accent2))); border-color:transparent; color:#fff; box-shadow:0 8px 24px var(--glow); }
.btn.ghost { background:transparent; }
.btn.small { padding:8px 14px; font-size:14px; border-radius:10px; }
.row { display:flex; gap:12px; flex-wrap:wrap; }

/* hero */
.hero { background:var(--hero); padding:72px 0 48px; overflow:hidden; }
.hero-in { display:grid; grid-template-columns:1.05fr 1fr; gap:40px; align-items:center; }
.pill { display:inline-block; padding:5px 12px; border-radius:99px; background:var(--raised); border:1px solid var(--line); color:var(--muted); font-size:13px; font-weight:500; }
h1 { font-size:clamp(34px,5vw,56px); line-height:1.08; letter-spacing:-.02em; margin:18px 0 16px; font-weight:800; }
[dir="rtl"] h1 { letter-spacing:0; line-height:1.3; }
.lead { font-size:19px; color:var(--muted); margin:0 0 26px; max-width:560px; }
.stats { display:grid; grid-template-columns:repeat(4,auto); gap:26px; margin-top:34px; }
.stats b { display:block; font-size:24px; }
.stats span { color:var(--muted); font-size:13px; }
.hero-art { position:relative; height:440px; }
.shot { position:absolute; border-radius:14px; border:1px solid var(--line); box-shadow:0 24px 60px rgba(0,0,0,.35); background:var(--card); }
.shot.a { width:82%; inset-inline-start:0; top:24px; }
.shot.b { width:30%; inset-inline-end:0; top:0; }
.shot.c { width:58%; inset-inline-end:6%; bottom:0; }

.trust { border-block:1px solid var(--line); background:var(--bg2); }
.trust-in { display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; padding-block:16px; color:var(--muted); font-size:14px; }
.trust-in span::before { content:"✓ "; color:var(--ok); font-weight:700; }

/* sections */
.sec { padding:84px 0; }
.sec.alt { background:var(--bg2); border-block:1px solid var(--line); }
h2 { font-size:clamp(28px,3.4vw,38px); margin:0 0 10px; letter-spacing:-.01em; }
.sub { color:var(--muted); margin:0 0 34px; font-size:17px; }
.h3 { margin:56px 0 14px; font-size:20px; }

.featured { display:grid; grid-template-columns:repeat(2,1fr); gap:20px; }
.fcard { background:var(--card); border:1px solid var(--line); border-radius:18px; overflow:hidden; display:flex; flex-direction:column; transition:transform .2s, box-shadow .2s, border-color .2s; }
.fcard:hover { transform:translateY(-3px); box-shadow:0 18px 44px var(--glow); border-color:color-mix(in srgb,var(--accent) 45%,var(--line)); }
.fcard .pic { height:220px; background:var(--raised); overflow:hidden; border-bottom:1px solid var(--line); }
.fcard .pic img { width:100%; height:100%; object-fit:cover; object-position:top; }
.fcard .body { padding:20px 22px 22px; display:flex; flex-direction:column; gap:8px; flex:1; }
.tag { color:var(--accent); font-weight:600; font-size:13px; text-transform:uppercase; letter-spacing:.06em; }
[dir="rtl"] .tag { letter-spacing:0; }
.fcard h4, .card h4 { margin:0; font-size:21px; }
.fcard p, .card p { margin:0; color:var(--muted); font-size:15px; }
.fcard ul { margin:6px 0 0; padding-inline-start:18px; color:var(--muted); font-size:14px; }
.price-row { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:14px; gap:10px; }
.price { font-weight:800; font-size:20px; }
.price small { font-weight:500; color:var(--muted); font-size:13px; }
.ver { font-size:12px; color:var(--muted); border:1px solid var(--line); border-radius:99px; padding:1px 8px; margin-inline-start:8px; vertical-align:middle; }

.chips { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.chip { border:1px solid var(--line); background:var(--card); color:var(--muted); border-radius:99px; padding:6px 14px; cursor:pointer; font:inherit; font-size:14px; }
.chip.on { background:var(--accent); color:var(--on); border-color:transparent; }
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:18px; display:flex; flex-direction:column; gap:6px; cursor:pointer; transition:border-color .2s, transform .2s; }
.card:hover { border-color:var(--accent); transform:translateY(-2px); }
.card h4 { font-size:17px; }

/* pricing */
.plans { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; align-items:stretch; }
.plan { background:var(--card); border:1px solid var(--line); border-radius:18px; padding:26px; display:flex; flex-direction:column; gap:10px; position:relative; }
.plan.featured { border:2px solid var(--accent); box-shadow:0 20px 50px var(--glow); }
.plan .badge { position:absolute; top:-12px; inset-inline-start:24px; background:var(--accent); color:var(--on); border-radius:99px; padding:2px 12px; font-size:12px; font-weight:700; }
.plan h4 { margin:0; font-size:19px; }
.plan .amount { font-size:36px; font-weight:800; }
.plan .per { color:var(--muted); font-size:14px; margin-top:-8px; }
.plan ul { list-style:none; margin:8px 0 18px; padding:0; color:var(--muted); font-size:15px; }
.plan li { padding:5px 0; }
.plan li::before { content:"✓  "; color:var(--ok); font-weight:700; }
.plan .btn { margin-top:auto; }

.steps { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin:26px 0 46px; }
.step { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:20px; }
.step b { display:inline-grid; place-items:center; width:32px; height:32px; border-radius:10px; background:var(--accent); color:var(--on); }
.step h4 { margin:12px 0 6px; } .step p { margin:0; color:var(--muted); font-size:15px; }
.showcase { display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:16px; }
.showcase figure { margin:0; background:var(--card); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.showcase img { height:230px; width:100%; object-fit:cover; object-position:top; }
.showcase figcaption { padding:12px 14px; color:var(--muted); font-size:14px; }

details { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px 18px; margin-bottom:10px; }
summary { cursor:pointer; font-weight:600; }
details p { color:var(--muted); margin:10px 0 2px; }

.contact { display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap; background:var(--card); border:1px solid var(--line); border-radius:20px; padding:30px; }
.contact .sub { margin:0; }

.foot { border-top:1px solid var(--line); padding:22px 0; color:var(--muted); font-size:14px; background:var(--bg2); }
.foot-in { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.foot b { color:var(--text); }
.legal { display:flex; gap:16px; flex-wrap:wrap; }
.legal a { color:var(--muted); }

.modal { position:fixed; inset:0; background:rgba(0,0,0,.55); display:grid; place-items:center; z-index:50; padding:16px; }
.modal[hidden] { display:none; }
.modal-card { background:var(--card); border:1px solid var(--line); border-radius:18px; max-width:760px; width:100%; max-height:90vh; overflow:auto; position:relative; }
.modal-card img { width:100%; max-height:340px; object-fit:cover; object-position:top; border-bottom:1px solid var(--line); }
.modal-card .mb { padding:22px 24px 24px; }
.x { position:absolute; top:10px; inset-inline-end:12px; border:0; background:var(--raised); color:var(--text); width:34px; height:34px; border-radius:10px; font-size:20px; cursor:pointer; z-index:2; }

@media (max-width:940px) {
  .links { display:none; }
  .hero-in, .featured, .plans, .showcase { grid-template-columns:1fr; }
  .steps { grid-template-columns:1fr 1fr; }
  .hero-art { height:300px; }
  .stats { grid-template-columns:repeat(2,auto); }
}
@media (max-width:560px) {
  .ctrls .btn { display:none; }
  .steps { grid-template-columns:1fr; }
  .hero { padding-top:44px; }
  .hero-art { height:230px; }
  .sec { padding:60px 0; }
}

/* ---- banner, news, product badge, contact form (added for AME Tools Admin link) ---- */
.banner { font-size:14px; font-weight:600; text-align:center; padding:9px 0; border-bottom:1px solid var(--line); background:color-mix(in srgb,var(--accent) 14%,var(--bg)); color:var(--text); }
.banner.promo { background:linear-gradient(90deg,var(--accent),var(--accent2)); color:#fff; border-color:transparent; }
.banner.warning { background:color-mix(in srgb,#e8a33d 22%,var(--bg)); }
.banner a { color:inherit; text-decoration:underline; text-underline-offset:3px; }
.news { display:flex; flex-direction:column; gap:12px; }
.news-item { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px 18px; }
.news-item time { color:var(--muted); font-size:13px; }
.news-item h4 { margin:2px 0 4px; font-size:17px; }
.news-item p { margin:0; color:var(--muted); }
.pbadge { display:inline-block; margin-inline-start:8px; padding:1px 9px; border-radius:99px; font-size:11px; font-weight:700; background:var(--accent2); color:#fff; vertical-align:middle; }
.cform { flex-basis:100%; display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:8px; }
.cform input, .cform textarea { font:inherit; color:var(--text); background:var(--raised); border:1px solid var(--line); border-radius:12px; padding:12px 14px; width:100%; }
.cform input:focus, .cform textarea:focus { outline:2px solid var(--accent); outline-offset:0; }
.cform textarea, .cform-row, .cform input[name="subject"] { grid-column:1 / -1; }
.cform-row { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.cstatus { color:var(--muted); font-size:14px; }
.cform .hp { position:absolute; inset-inline-start:-9999px; width:1px; height:1px; opacity:0; }
@media (max-width:640px) { .cform { grid-template-columns:1fr; } }

/* bundles + launch sale */
.bundles { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; }
.bundle { background:var(--card); border:1px solid var(--line); border-radius:18px; padding:22px; display:flex; flex-direction:column; gap:8px; position:relative; }
.bundle.featured { border:2px solid var(--accent); box-shadow:0 20px 50px var(--glow); }
.bundle .badge { position:absolute; top:-12px; inset-inline-start:22px; background:var(--accent); color:var(--on); border-radius:99px; padding:2px 12px; font-size:12px; font-weight:700; }
.bundle h4 { margin:0; font-size:20px; }
.bundle ul { margin:4px 0 0; padding-inline-start:18px; color:var(--muted); font-size:14px; }
.incl { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.incl small { color:var(--muted); margin-inline-end:4px; }
.tchip { border:1px solid var(--line); background:var(--raised); border-radius:99px; padding:3px 10px; font-size:13px; cursor:pointer; }
.tchip.extra { cursor:default; border-style:dashed; color:var(--muted); }
.bundle .save { color:var(--ok); font-size:13px; font-weight:600; }
s.was { color:var(--muted); font-weight:500; font-size:.75em; margin-inline-end:4px; }
.bundle .price-row { flex-wrap:wrap; }
.bundle .price-row .btn, .fcard .price-row .btn { white-space:nowrap; }
