﻿/* ==========================================================
   PingPro marketing site - main stylesheet
   - Uses CSS *logical* properties (inline-start/end, margin-inline...)
     so the layout mirrors automatically when <html dir="rtl">.
   - Light theme by default, dark theme via prefers-color-scheme.
   ========================================================== */

:root {
  --bg: #fafafa;
  --bg-alt: #edf3ee;
  --surface: #ffffff;
  --text: #102a18;
  --text-muted: #52635a;
  --border: #dbe5dd;
  --primary: #269840;
  --primary-dark: #1c7a32;
  --accent: #269840;
  --ph-bg: #fff4c2;      /* placeholder highlight */
  --ph-border: #d4a500;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Noto Sans Hebrew", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1610;
    --bg-alt: #12201a;
    --surface: #162619;
    --text: #e5f0e8;
    --text-muted: #9bb2a2;
    --border: #26402e;
    --shadow: 0 10px 30px rgba(0, 0, 0, .4);
    --ph-bg: #4a3d00;
    --ph-border: #b28a00;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: 5rem; }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-inline: auto; text-align: center; margin-block-end: 3rem; }
.section-head p { color: var(--text-muted); }
.eyebrow { color: var(--primary); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.skip-link { position: absolute; inset-inline-start: -999px; top: 0; background: var(--primary); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { inset-inline-start: 0; }

/* ---------- PLACEHOLDER MARKER ----------
   Anything wrapped in <mark class="ph"> is text/link you MUST replace. */
.ph {
  background: var(--ph-bg);
  color: inherit;
  border: 1px dashed var(--ph-border);
  border-radius: 4px;
  padding: 0 .3em;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-block-end: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.brand img { width: auto; height: 44px; }
.nav-menu { display: flex; align-items: center; gap: 1.5rem; }
.nav-menu a { color: var(--text-muted); text-decoration: none; font-weight: 500; }
.nav-menu a:hover, .nav-menu a[aria-current="page"] { color: var(--primary); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; padding: .5rem .6rem; cursor: pointer; color: var(--text); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; position: relative; content: "";
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.4rem; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--primary); color: #fff; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn.outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn.outline:hover { border-color: var(--primary); color: var(--primary); }
.btn.block { width: 100%; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 60%, transparent); outline-offset: 2px; }

/* ---------- Hero ---------- */
.hero { padding-block: 5rem 4rem; background: radial-gradient(1100px 500px at 80% -10%, color-mix(in srgb, var(--primary) 18%, transparent), transparent); }
.hero-text { max-width: 760px; margin-inline: auto; text-align: center; }
.hero p.lead { font-size: 1.2rem; color: var(--text-muted); }
.hero-cta { justify-content: center; display: flex; flex-wrap: wrap; gap: .8rem; margin-block: 1.5rem; }
.platforms { color: var(--text-muted); font-size: .9rem; }
.hero-art { margin-block-start: 3rem; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: .75rem; }

/* ---------- Cards / features ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 14%, transparent); font-size: 1.4rem; margin-block-end: 1rem; }
.card p { color: var(--text-muted); margin: 0; }

/* ---------- Screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.shots figure { margin: 0; }
.shots img { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }
.shots figcaption { text-align: center; color: var(--text-muted); font-size: .9rem; margin-block-start: .6rem; }

/* ---------- Pricing ---------- */
.billing-toggle { display: flex; justify-content: center; align-items: center; gap: .8rem; margin-block-end: 2rem; color: var(--text-muted); }
.switch { position: relative; width: 52px; height: 28px; background: var(--border); border-radius: 99px; border: 0; cursor: pointer; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { inset-inline-start: 27px; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.featured { border-color: var(--primary); box-shadow: var(--shadow); }
.plan .badge { position: absolute; top: -12px; inset-inline-start: 1.6rem; background: var(--primary); color: #fff; font-size: .75rem; font-weight: 700; padding: .2rem .7rem; border-radius: 99px; }
.price { font-size: 2.6rem; font-weight: 800; margin-block: .5rem; }
.price small { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.plan ul { list-style: none; padding: 0; margin: 1rem 0 1.5rem; flex: 1; }
.plan li { padding-block: .35rem; padding-inline-start: 1.6rem; position: relative; color: var(--text-muted); }
.plan li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--accent); font-weight: 700; }
.note { text-align: center; color: var(--text-muted); font-size: .9rem; margin-block-start: 1.5rem; }

/* ---------- Download ---------- */
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.dl { text-align: center; }
.dl .icon { margin-inline: auto; }
.dl .btn { margin-block-start: 1rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-block-end: .8rem; padding: 0 1.3rem; }
.faq summary { cursor: pointer; font-weight: 600; padding-block: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--primary); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-muted); padding-block-end: 1.1rem; margin: 0; }

/* ---------- Page header + legal / contact ---------- */
.page-head { padding-block: 3.5rem 2rem; background: var(--bg-alt); border-block-end: 1px solid var(--border); }
.page-head p { color: var(--text-muted); margin: 0; }
.prose { max-width: 780px; margin-inline: auto; padding-block: 3rem 5rem; }
.prose h2 { font-size: 1.5rem; margin-block-start: 2rem; }
.prose ul { padding-inline-start: 1.4rem; }
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; padding-block: 3rem 5rem; }
form .field { margin-block-end: 1.1rem; }
label { display: block; font-weight: 600; margin-block-end: .35rem; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: .7rem .9rem;
}
textarea { min-height: 150px; resize: vertical; }
.form-msg { margin-block-start: 1rem; padding: .8rem 1rem; border-radius: 10px; background: color-mix(in srgb, var(--accent) 15%, transparent); display: none; }
.form-msg.show { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-block-start: 1px solid var(--border); padding-block: 3rem 2rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-block-end: .4rem; }
.footer-grid a { color: var(--text); text-decoration: none; }
.footer-grid a:hover { color: var(--primary); }
.copyright { margin-block-start: 2rem; padding-block-start: 1.2rem; border-block-start: 1px solid var(--border); color: var(--text-muted); }

/* ---------- RTL tweaks ----------
   Logical properties handle most mirroring. Only things that don't
   mirror on their own (directional glyphs, transforms) go here. */
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .grid.cols-3, .shots, .download-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding-block: 3.5rem; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none; position: absolute; inset-inline: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-block-end: 1px solid var(--border); padding: .5rem 1.25rem 1rem;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding-block: .8rem; }
}
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Added: plans grid, status dots, screenshot layout ---------- */
.grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-inline: .2rem; }
.dot.ok { background: #269840; } .dot.info { background: #1565c0; } .dot.warn { background: #e07b00; } .dot.bad { background: #c62828; }
.shots { grid-template-columns: repeat(2, 1fr); }
.shots .wide { grid-column: 1 / -1; }
.hero-art img { border-radius: 12px; }
@media (max-width: 1000px) { .grid.cols-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .shots { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid.cols-5 { grid-template-columns: 1fr; } }


.hero-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; margin-block: 1.5rem 2rem; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); background: #000; }
.hero-text { max-width: 900px; }
.plan ul { margin-block-end: 0; }


/* ---------- Contact page: form + illustration of equal height ---------- */
.contact-form { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; padding-block: 3rem 5rem; align-items: stretch; }
.contact-form { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.contact-art { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); min-height: 320px; }
.contact-art img { width: 100%; height: 100%; object-fit: cover; }
.contact-form .form-msg { grid-column: 1 / -1; margin: 0; }
.form-msg.err { background: color-mix(in srgb, #c62828 15%, transparent); }
@media (max-width: 900px) { .contact-form { grid-template-columns: 1fr; } .contact-art { min-height: 260px; order: -1; } }

