/* NahiDeck tanıtım sitesi — sistem temasına göre açık/koyu (prefers-color-scheme).
 * Renkler: design-tokens.md ve themes.json varsayılanları (darkCarbon / lightPearl, vivid-red).
 */

:root {
  color-scheme: light;
  --bg: #F8F8F8;
  --surface: #FFFFFF;
  --text: #1A1A1A;
  --muted: #555555;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #CC1F1F;
  --accent-text: #FFFFFF;
  --soon-bg: rgba(0, 0, 0, 0.05);
  --radius: 14px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F172A;
    --surface: #1E293B;
    --text: #F1F5F9;
    --muted: #94A3B8;
    --line: rgba(255, 255, 255, 0.10);
    --accent: #FF3B3B;
    --accent-text: #FFFFFF;
    --soon-bg: rgba(255, 255, 255, 0.06);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F172A;
  --surface: #1E293B;
  --text: #F1F5F9;
  --muted: #94A3B8;
  --line: rgba(255, 255, 255, 0.10);
  --accent: #FF3B3B;
  --accent-text: #FFFFFF;
  --soon-bg: rgba(255, 255, 255, 0.06);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Üst bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }

/* Logo: .on-light koyu renkli logo (açık tema), .on-dark açık renkli logo (koyu tema) */
.logo-swap { display: block; position: relative; }
.logo-swap img { display: block; width: 100%; height: 100%; }
.logo-swap .on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-swap .on-light { display: none; }
  :root:not([data-theme="light"]) .logo-swap .on-dark { display: block; }
}
:root[data-theme="dark"] .logo-swap .on-light { display: none; }
:root[data-theme="dark"] .logo-swap .on-dark { display: block; }
.brand .logo-swap { width: 24px; height: 24px; }
.brand .logo-full { width: auto; height: 28px; }
.brand .logo-full img { width: auto; height: 100%; }

.nav { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }

button.theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
button.theme-toggle:hover { color: var(--text); }

a.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
}
a.home-link:hover { color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--text); text-decoration: none; }

select.lang option {
  background: var(--surface);
  color: var(--text);
}

select.lang {
  -webkit-appearance: none;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 28px 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* Hero */
.hero {
  text-align: center;
  padding: 96px 0 72px;
}
.hero-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 32px;
}
.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hero h1 {
  font-size: clamp(40px, 6.2vw, 68px);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.06;
  max-width: 820px;
  margin: 0 auto;
}
.hero p {
  margin: 24px auto 0;
  font-size: clamp(18px, 2vw, 21px);
  color: #0F172A;
  max-width: 620px;
}
.hero h1 { color: #0F172A; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero h1,
  :root:not([data-theme="light"]) .hero p { color: #F8F8F8; }
}
:root[data-theme="dark"] .hero h1,
:root[data-theme="dark"] .hero p { color: #F8F8F8; }
:root[data-theme="light"] .hero h1,
:root[data-theme="light"] .hero p { color: #0F172A; }

/* Butonlar: aynı boyut, aynı biçim */
.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  background: var(--accent);
  color: var(--accent-text);
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.88; text-decoration: none; }

.soon {
  margin-top: 48px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.soon-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.soon-list span {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--soon-bg);
  color: var(--muted);
  font-size: 14px;
}

/* Özellikler */
.features {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0 0 96px;
}
.feature {
  flex: 1 1 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.feature h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.feature p { font-size: 15px; color: var(--muted); }

/* Vitrin (Lusion tarzi minimal gorsel alani) */
.showcase {
  padding: 0 0 96px;
  overflow: hidden; /* satirlar animasyonla sagdan gelir; disari tasan kismi kirp */
}
.hero-shot {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-shot img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-shot img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

.showcase {
  padding: 0 0 96px;
}
.showcase-row {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-bottom: 96px;
  opacity: 0;
  transform: translateX(80px);
  transition: opacity .7s ease, transform .7s ease;
}
.showcase-row.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.showcase-row--reverse {
  flex-direction: row;
}
.showcase-media {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  margin-left: 24px;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  background: var(--surface);
  padding: 8px;
  height: auto;
  aspect-ratio: auto;
  overflow: hidden;
}
.showcase-media img {
  position: static;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.showcase-text {
  flex: 1 1 0;
  min-width: 0;
}
.showcase-text h3 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.showcase-text p {
  font-size: 17px;
  color: var(--muted);
  max-width: 420px;
}

/* Alt bilgi */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 13px;
  color: var(--muted);
}
.footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* Yasal sayfalar */
.legal {
  padding: 64px 0 56px;
  max-width: 780px;
}
.legal h1 {
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.legal .meta { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.legal h2 { font-size: 20px; font-weight: 600; margin: 40px 0 12px; }
.legal h3 { font-size: 17px; font-weight: 600; margin: 0 0 10px; }
.legal p, .legal ul, .legal ol { margin-bottom: 14px; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 14px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--muted); font-weight: 600; }
.legal code { font-size: 13px; background: var(--soon-bg); padding: 1px 6px; border-radius: 6px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 16px 0 24px;
}
.card-danger { border-color: var(--accent); }

/* Tarayıcı eklentisi sayfası: Chromium solda, Firefox sağda */
.ext-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 760px;
  margin: 0 auto 40px;
}
.ext-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ext-card h3 { font-size: 17px; font-weight: 600; }
.ext-card p { font-size: 15px; color: var(--muted); }
.ext-card .btn {
  align-self: stretch;
  height: auto;
  margin-top: auto;
  padding: 14px 20px;
  text-align: center;
  line-height: 1.3;
}
.ext-card.is-soon { opacity: 0.6; }
.ext-card .btn-disabled {
  background: var(--soon-bg);
  color: var(--muted);
  cursor: default;
}
.ext-card .btn-disabled:hover { opacity: 1; }
.ext-head { display: flex; align-items: center; gap: 12px; }
.ext-icon { width: 40px; height: 40px; flex-shrink: 0; }
.ext-notes { max-width: 760px; margin: 0 auto 48px; }
.ext-notes .card { margin: 0; }
.ext-notes h3 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.ext-notes ul { margin: 0; padding-left: 22px; }
.ext-notes li { margin-bottom: 12px; line-height: 1.6; }
.ext-notes li:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .ext-split { grid-template-columns: 1fr; }
}

/* ============================================================
   RTL — Arapça (ar) ve Farsça (fa) için sağdan sola metin yönü.
   site.js, <html dir="rtl"> yerine <html data-rtl="true"> set eder;
   böylece tarayıcının flex layout'ları otomatik mirror etmesi engellenir.
   Düzen (header, butonlar, vitrin sırası, alt bilgi) aynı kalır;
   yalnızca metin içerikleri (başlıklar, açıklamalar, listeler)
   sağdan sola doğal akışına kavuşur.
   ============================================================ */

/* Hero metinleri: ortalı kalır ama bidi yönü rtl olur */
[data-rtl="true"] .hero h1,
[data-rtl="true"] .hero p,
[data-rtl="true"] .soon {
  direction: rtl;
  unicode-bidi: isolate;
}

/* Özellik kartları: metin sağdan sola akar ve sağa hizalanır */
[data-rtl="true"] .feature {
  direction: rtl;
  text-align: right;
}

/* Vitrin yazı bloğu: metin sağdan sola akar ve sağ kenardan soldaki görsel gibi 24px boşluk bırakır */
[data-rtl="true"] .showcase-text {
  direction: rtl;
  text-align: right;
  margin-right: 24px;
}

/* Yasal sayfalar: metin gövdesi sağdan sola */
[data-rtl="true"] .legal {
  direction: rtl;
  text-align: right;
}
[data-rtl="true"] .legal ul,
[data-rtl="true"] .legal ol {
  padding-left: 0;
  padding-right: 22px;
}
[data-rtl="true"] .legal th,
[data-rtl="true"] .legal td {
  text-align: right;
}

/* Eklenti sayfası metinleri */
[data-rtl="true"] .ext-card p {
  direction: rtl;
  text-align: right;
}
[data-rtl="true"] .ext-notes {
  direction: rtl;
  text-align: right;
}
[data-rtl="true"] .ext-notes ul {
  padding-left: 0;
  padding-right: 22px;
}

/* Telefon */
@media (max-width: 880px) {
  .feature { flex: 1 1 calc(50% - 8px); }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 64px 0 56px; }
  .hero-logo { width: 76px; height: 76px; margin-bottom: 24px; }
  .hero h1, .hero p { padding: 0 8px; }
  .actions { grid-template-columns: 1fr; gap: 12px; justify-items: center; }
  .btn { width: 100%; max-width: 300px; }
  .feature { flex: 1 1 100%; }
  .features { padding-bottom: 64px; }
  .showcase-row { flex-direction: column; gap: 20px; align-items: stretch; }
  .showcase-row--reverse { flex-direction: column; }
  .showcase-row--reverse .showcase-text { padding-left: 0; }
  .showcase-media { flex: none; width: 100%; height: auto; aspect-ratio: 16 / 9; -webkit-mask-image: none; mask-image: none; }
  .showcase-media { margin: 0 auto; }
  .showcase-text { text-align: center; }
  .showcase-text p { margin-left: auto; margin-right: auto; }
  [data-rtl="true"] .showcase-text { margin-right: 0; text-align: center; }
  .feature { text-align: center; }
  .nav { gap: 12px; font-size: 13px; }
  .nav .hide-sm { display: none; }
}
