/* Styles added with the app release: language menu, blog, testimonials, platforms, the Play/Music dock,
   install and consent sheets, phone tab bar, right-to-left languages, and phone-size fixes. */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── language menu ── */
.hdr-glass { width: min(900px, 100%); }                       /* wider than before: the bar now also holds the language button */
.hdr-pill { gap: 10px; }
.hdr-pill .nav { flex: 1 1 auto; min-width: 0; justify-content: center; margin: 0; }
.hdr-pill .logo { flex: none; }
.hdr-cta { flex: none; height: 44px; padding: 0 22px; line-height: 1; }      /* never squeezed, so its label always fits */
.hdr-cta .ico { flex: none; }
.lang { position: relative; flex: none; }
.lang-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; min-width: 76px; padding: 0 16px; line-height: 1; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; font: 600 12px/1 var(--body); letter-spacing: .06em; cursor: pointer; }
.lang-btn:hover, .lang.open .lang-btn { background: rgba(255, 255, 255, .22); }
.lang-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); min-width: 150px; padding: 6px; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .45), 0 0 0 1px var(--line); display: none; z-index: 30; }
.lang.open .lang-menu { display: grid; }
.lang-menu a { padding: 10px 12px; border-radius: 9px; font-size: 14px; }
.lang-menu a:hover { background: #f1f2f4; } .lang-menu a[aria-current] { font-weight: 600; background: color-mix(in srgb, var(--accent) 45%, #fff); }
.mnav-lang { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 8px 4px; }
.mnav .mnav-lang a { padding: 8px 14px; border-radius: 999px; font: 500 14px var(--body); background: rgba(255, 255, 255, .12); }
.mnav .mnav-lang a[aria-current] { background: var(--accent); color: var(--accent-ink); }
.lang-btn .ico { flex: none; display: block; } .lang-btn span { display: block; padding-top: 1px; }
@media (max-width: 860px) { .lang { margin-inline-start: auto; } .lang-btn { min-width: 0; padding: 0 14px; } }

/* ── footer: platforms, install link, headings ── */
.ftr-h { font: 600 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.ftr-platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; padding: 22px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
.ftr-platforms span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ftr-platforms a { display: inline-flex; align-items: center; font: 600 18px/1 var(--display); letter-spacing: .04em; opacity: .85; transition: opacity .2s; }
.ftr-platforms a:hover { opacity: 1; } .ftr-platforms img { height: 28px; width: auto; }
.ftr-install { background: none; border: 1px solid currentColor; color: inherit; border-radius: 999px; padding: 6px 14px; font: inherit; cursor: pointer; opacity: .85; }
.ftr-install:hover { opacity: 1; }

/* ── blog ── */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: clamp(32px, 5vw, 64px); }
.pcard { display: grid; gap: 12px; align-content: start; padding-bottom: 8px; }
.pcard-art { aspect-ratio: 21 / 9; border-radius: 16px; overflow: hidden; background: #1c1c1c; display: grid; place-items: center; }
.pcard-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease, ease); }
.pcard-art span { font: 700 44px/1 var(--display); color: var(--accent); }
.pcard:hover .pcard-art img { transform: scale(1.04); }
.pcard-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.pcard h2 { font-size: clamp(24px, 2.4vw, 32px); } .pcard p { font-size: 14px; color: #555; }
.post .page-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.post-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-acts .btn { gap: 8px; } .post-acts b { font-weight: 600; margin-inline-start: 2px; }
#like-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
#like-btn[aria-pressed="true"] .ico { fill: currentColor; }
.share-links { display: none; flex-wrap: wrap; gap: 6px; }
.share-links.open { display: flex; }
.share-links a, .share-links button { padding: 9px 14px; border-radius: 999px; border: 0; background: #eef0f3; font: 500 13px var(--body); color: var(--ink); cursor: pointer; }
.share-links a:hover, .share-links button:hover { background: #e2e5ea; }
.comments { margin-top: 56px; }
.comment { padding: 18px 0; border-top: 1px solid var(--line); }
.comment b { font-weight: 600; margin-inline-end: 10px; } .comment time { font-size: 12px; color: var(--muted); }
.comment p { margin-top: 6px; white-space: pre-line; color: #444; }
.comment-none { color: var(--muted); padding: 14px 0; }
.comment-form { margin-top: 28px; padding: clamp(18px, 3vw, 32px); border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.comment-form h3 { grid-column: 1 / -1; font-size: 24px; }

/* ── testimonials ── */
.tgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(16px, 2vw, 28px); margin-top: clamp(32px, 5vw, 64px); }
.tcard { display: grid; gap: 18px; align-content: space-between; margin: 0; padding: clamp(20px, 2.4vw, 32px); border-radius: 18px; background: var(--card); box-shadow: 0 1px 0 rgba(0, 0, 0, .03), 0 14px 30px -24px rgba(0, 0, 0, .25); }
.tcard blockquote { font: 500 clamp(18px, 1.7vw, 22px)/1.35 var(--display); }
.tcard figcaption { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.tcard figcaption img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.tcard figcaption b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.tcard figcaption a { text-decoration: underline; }
.stars { display: flex; gap: 3px; }
.stars i { width: 14px; height: 14px; background: #d9dce1; clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 77%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
.stars i.on { background: var(--ink); }

/* ── contact form extras ── */
.form label.check { display: flex; flex-direction: row; align-items: center; gap: 10px; font-size: 14px; }
.form label.check input { width: 18px; height: 18px; flex: none; accent-color: var(--ink); }

/* ── Play / Music dock ── */
.dock { position: fixed; z-index: 60; inset-inline-start: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(18, 18, 18, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .6); }
.dock button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: #fff; font: 500 12px/1 var(--body); cursor: pointer; }
.dock button:hover { background: rgba(255, 255, 255, .14); }
.dock button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.dock .i-pause, .dock .i-on { display: none; }
body.playing .dock .i-play { display: none; } body.playing .dock .i-pause { display: inline; }
body.music .dock .i-off { display: none; } body.music .dock .i-on { display: inline; }

/* ── sheets: install prompt, consent, update notice ── */
.sheet { position: fixed; z-index: 80; inset-inline: 0; bottom: calc(16px + env(safe-area-inset-bottom)); margin: 0 auto; width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: #121212; color: #fff; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7); font-size: 13px; }
.sheet[hidden] { display: none; }
.sheet img { border-radius: 10px; flex: none; }
.sheet > div:first-of-type, .sheet > img + div { flex: 1; min-width: 0; }
.sheet b { font: 600 17px/1.2 var(--display); letter-spacing: .02em; } .sheet p { margin: 2px 0 0; color: #c9c9c9; }
.sheet a { text-decoration: underline; color: #fff; }
.sheet-acts { display: flex; gap: 6px; flex: none; }
.sheet-acts button { height: 38px; padding: 0 14px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font: 500 13px var(--body); cursor: pointer; }
.sheet-acts button.yes { background: var(--accent); color: var(--accent-ink); }
.offline-pill { position: fixed; z-index: 70; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: #b3261e; color: #fff; font: 600 12px/1 var(--body); letter-spacing: .04em; }
.offline-pill[hidden] { display: none; }
.app-toast { position: fixed; z-index: 90; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 999px; background: #121212; color: #fff; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── phone tab bar ── */
.tabbar { display: none; }
@media (max-width: 640px) {
  .tabbar { position: fixed; z-index: 55; inset: auto 0 0 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; font-size: 10px; font-weight: 500; color: #6b6b6b; }
  .tabbar a.on { color: var(--ink); background: color-mix(in srgb, var(--accent) 55%, #fff); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .ftr { margin-bottom: 0; }
  .float { bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  .float .float-quote { display: none; }                 /* the tab bar already has Contact */
  .dock { bottom: calc(76px + env(safe-area-inset-bottom)); inset-inline-start: 10px; }
  .dock button { padding: 0 11px; } .dock button span { display: none; }
  .sheet { bottom: calc(126px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .sheet-acts { width: 100%; justify-content: flex-end; }
  .app-toast { bottom: calc(132px + env(safe-area-inset-bottom)); }
  .adminbar { bottom: calc(126px + env(safe-area-inset-bottom)) !important; }
}
@media (display-mode: standalone) { .hdr { padding-top: env(safe-area-inset-top); } }

/* ── phone-size polish ── */
@media (max-width: 640px) {
  .hdr-strip { font-size: 11px; gap: 8px; }
  .hdr-strip .status em { display: none; }
  .form input, .form select, .form textarea { font-size: 16px; }     /* stops iOS zooming into fields */
  .btn { min-height: 44px; }
  .ftr-bar { flex-direction: column; align-items: flex-start; gap: 14px; }
  .post-acts .btn { flex: 1; justify-content: center; }
}
@media (max-width: 420px) { .hdr-strip > span:first-child b, .hdr-strip > span:last-child b { display: none; } }

/* ── right-to-left languages ── */
[dir="rtl"] body { font-family: "IBM Plex Sans Arabic", var(--body); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] .btn, [dir="rtl"] .mnav a, [dir="rtl"] .tcard blockquote, [dir="rtl"] .sheet b { font-family: "IBM Plex Sans Arabic", var(--display); letter-spacing: 0; }
[dir="rtl"] .logo-word, [dir="rtl"] .ftr-mark, [dir="rtl"] .logo-sub { direction: ltr; }     /* the wordmark stays as it is */
[dir="rtl"] .btn .ico, [dir="rtl"] .link .ico, [dir="rtl"] .svc-a .ico, [dir="rtl"] .ftr-talk .ico { transform: scaleX(-1); }
[dir="rtl"] .back { direction: rtl; }
[dir="rtl"] .eyebrow, [dir="rtl"] .chip, [dir="rtl"] .ftr-h { letter-spacing: 0; }
[dir="rtl"] .float { right: auto; left: 16px; }
[dir="rtl"] .hero-vid { inset: 0 0 112px 4%; }
[dir="rtl"] .eros-note, [dir="rtl"] .dinos .eros-note { left: auto; right: 16px; }
[dir="rtl"] .eros-credit { right: auto; left: 16px; }
[dir="rtl"] .feat::before { left: auto; right: 0; }
[dir="rtl"] .prose ul, [dir="rtl"] .prose ol { padding-right: 1.2em; padding-left: 0; }
[dir="rtl"] .lit .w { unicode-bidi: plaintext; }

/* Things parked off-screen on the left would make a right-to-left page scroll sideways: park them on the right instead */
[dir="rtl"] .skip { left: auto; right: -999px; } [dir="rtl"] .skip:focus { right: 8px; }
[dir="rtl"] .hp { left: auto; right: -9999px; }
[dir="rtl"] .ticker { direction: ltr; }
html[dir="rtl"] { overflow-x: clip; }
/* Wording that has not been translated yet keeps its own left-to-right word order, lined up on the right (set by app.js) */
.ltr-in-rtl { direction: ltr; text-align: right; }
