/*
 * style.css — RedoSan Authenticity host-root landing page
 * Base tokens, layout components and brand-mark theme swap.
 * Pair with responsive.css for phone/tablet adaptation.
 */

/* ── Design tokens ── */
:root,
:root[data-theme="dark"] {
  --primary: #6c5ce7;
  --primary-dark: #5a4bd1;
  --bg: #0f0f1a;
  --card: #1a1a2e;
  --text: #e8e8f0;
  --muted: #9b9bb5;
  --border: #2a2a45;
  --radius: 12px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f5fa;
  --card: #ffffff;
  --text: #1a1a2e;
  --muted: #6b6b85;
  --border: #d0d0e0;
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Fixed control buttons (theme / language) ── */
.controls {
  position: fixed;
  inset-block-start: 14px;
  inset-inline-end: 14px;
  display: flex;
  gap: 8px;
  z-index: 50;
}

.ctl-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .15s ease, transform .15s ease;
}

.ctl-btn:hover { border-color: var(--primary); transform: translateY(-2px); }

/* ── Accessibility ── */
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 8px;
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  z-index: 99;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus { inset-inline-start: 8px; }

a:focus-visible,
button:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

/* ── Hero ── */
main { flex: 1; max-width: 960px; width: 100%; margin: 0 auto; padding: 48px 20px; }

.hero { text-align: center; margin-bottom: 48px; }

/* Brand mark, mirroring the main project's swap (Style/style.css):
   white variant on dark, black variant on light.
   Rendered as CSS backgrounds (not <img>) so browsers never offer
   "Open/Save image as", plus drag & callout suppression below. */
.logo-mark {
  display: inline-block;
  width: 88px;
  height: 59px; /* 3:2 intrinsic ratio of both source assets */
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border-radius: 16px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.logo-white { background-image: url("/assets/logo.webp"); }
.logo-black { display: none; background-image: url("/assets/logo-black.png"); }
[data-theme="light"] .logo-white { display: none; }
[data-theme="light"] .logo-black { display: inline-block; }

.hero h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); margin: 18px 0 10px; letter-spacing: -0.02em; }
:root[dir="rtl"] .hero h1 { letter-spacing: 0; }
.hero h1 span { color: var(--primary); }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 640px; margin: 0 auto 26px; line-height: 1.65; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.cta-primary { background: var(--primary); color: #fff; }
.cta-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(108,92,231,.35); }
.cta-ghost { margin-inline-start: 12px; border: 1px solid var(--border); color: var(--text); background: var(--card); }
.cta-ghost:hover { border-color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
  .cta, .ctl-btn { transition: none; }
  .cta-primary:hover, .tool:hover, .ctl-btn:hover { transform: none; }
}

/* ── Tool highlights grid ── */
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 44px; }

.tool {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}

.tool:hover { border-color: var(--primary); transform: translateY(-3px); }
.tool b { display: block; margin-bottom: 4px; font-size: .98rem; }
.tool small { color: var(--muted); line-height: 1.45; display: block; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 22px 20px;
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
}

footer a { color: var(--muted); text-decoration: none; margin: 0 10px; }
footer a:hover { color: var(--primary); }

/* ── CLI showcase ── */
.cli {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px;
  align-items: center;
  margin-bottom: 56px;
}
.cli-copy h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 12px; }
.cli-copy > p { color: var(--muted); line-height: 1.65; margin-bottom: 18px; }
.cli-points { list-style: none; }
.cli-points li {
  position: relative;
  padding-inline-start: 22px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.9;
}
.cli-points li::before {
  content: "▸";
  position: absolute;
  inset-inline-start: 2px;
  color: var(--primary);
}

.term {
  background: #0d1117;
  border: 1px solid rgba(240,246,252,.14);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px;
  background: rgba(240,246,252,.05);
  border-block-end: 1px solid rgba(240,246,252,.09);
}
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.term-title {
  margin-inline-start: 8px;
  color: #8b949e;
  font-size: .78rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  flex: 1;
  text-align: center;
}
.copy-btn {
  flex: none;
  border: 1px solid rgba(240,246,252,.18);
  background: transparent;
  color: #c9d1d9;
  font-size: .74rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.copy-btn:hover { background: rgba(108,92,231,.28); color: #fff; }
.copy-btn.copied { background: #238636; border-color: #238636; color: #fff; }

.term-body {
  margin: 0;
  padding: 16px 18px 18px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .84rem;
  line-height: 1.75;
  color: #e6edf3;
}
.t-cmt { color: #7d8590; font-style: italic; }
.t-p { color: #a48bff; font-weight: 700; user-select: none; }

@media (prefers-reduced-motion: reduce) { .copy-btn { transition: none; } }
