/* Trent marketing site — shared styles (ported from the app's visual language) */
:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-elev: #1c1c1e;
  --fg: #f5f5f5;
  --fg-mid: #a8a8a8;
  --fg-faint: #6e6e6e;
  --accent: #10b981;
  --brand: #145783;       /* Trent badge blue */
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --bar-bg: rgba(10,10,10,0.82);
  --radius: 16px;
  --maxw: 600px;
}
/* light theme (toggled via html[data-theme="light"]) */
html[data-theme="light"] {
  --bg: #f4f5f7;
  --bg-card: #ffffff;
  --bg-elev: #e9ebef;
  --fg: #14161a;
  --fg-mid: #5b616b;
  --fg-faint: #939aa4;
  --accent: #0a8f6c;
  --border: rgba(0,0,0,0.10);
  --border-strong: rgba(0,0,0,0.16);
  --bar-bg: rgba(255,255,255,0.85);
}
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* language visibility */
[data-en], [data-he] { display: none; }
html[lang="en"] [data-en] { display: inline; }
html[lang="he"] [data-he] { display: inline; }
html[lang="en"] [data-en].block,
html[lang="he"] [data-he].block { display: block; }
html[lang="he"] body { direction: rtl; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px max(16px, calc((100% - 720px) / 2));
  background: var(--bar-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar .brand { font-size: 20px; font-weight: 900; letter-spacing: -0.5px; }
.topbar-left { display: flex; align-items: center; gap: 6px; }
.topbar-back { font-size: 28px; line-height: 1; color: var(--fg); text-decoration: none; padding: 0 4px; margin-inline-start: -4px; }
.topbar-back:hover { color: var(--fg-mid); }
html[lang="he"] .topbar-back { display: inline-block; transform: scaleX(-1); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: flex; gap: 2px;
  background: rgba(128,128,128,0.14); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px;
}
.icon-btn { all: unset; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--fg-mid); }
.icon-btn:hover { color: var(--fg); background: rgba(128,128,128,0.16); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .ico-moon { display: none; }
.icon-btn .ico-sun { display: block; }
html[data-theme="light"] .icon-btn .ico-sun { display: none; }
html[data-theme="light"] .icon-btn .ico-moon { display: block; }
.lang-switch button {
  all: unset; cursor: pointer; padding: 5px 11px;
  font-size: 12px; font-weight: 600; color: var(--fg-mid);
  border-radius: 999px; transition: background 0.15s, color 0.15s;
}
.lang-switch button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.btn-download {
  cursor: pointer; border: none;
  padding: 8px 16px; border-radius: 999px;
  background: var(--accent); color: #00140c;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}

/* ---------- hero ---------- */
.hero { text-align: center; padding: 48px 20px 28px; max-width: 640px; margin: 0 auto; }
.hero .wordmark {
  font-size: 52px; font-weight: 900; letter-spacing: -2px; margin: 0 0 14px;
  background: linear-gradient(135deg, #ffffff 0%, #8a8a8a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html[data-theme="light"] .hero .wordmark { background: linear-gradient(135deg, #14161a 0%, #5b616b 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .tagline { font-size: 18px; color: var(--fg-mid); margin: 0 0 24px; }
.store-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.store-badge {
  cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 14px;
  background: var(--fg); color: var(--bg);
  border: none; font-weight: 700;
}
.store-badge.secondary { background: var(--bg-elev); color: var(--fg); border: 1px solid var(--border-strong); }
.store-badge small { display: block; font-size: 10px; font-weight: 600; opacity: 0.7; line-height: 1; }
.store-badge strong { display: block; font-size: 15px; line-height: 1.15; }
.store-badge svg { width: 22px; height: 22px; flex: none; }

/* ---------- feed ---------- */
.feed { max-width: var(--maxw); margin: 0 auto; padding: 8px 14px 60px; display: flex; flex-direction: column; gap: 16px; }
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}

/* listing card (embedded inside a post card, like the app's FeedListingCard) */
.lcard { display: block; cursor: pointer; position: relative; border-radius: 12px; overflow: hidden; }
.pcard .lcard { margin-top: 10px; }
.lcard .photo { position: relative; aspect-ratio: 4 / 3; background: var(--bg-elev); }
.lcard .photo img { width: 100%; height: 100%; object-fit: cover; }
.lcard .photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,12,0.86) 0%, rgba(8,8,12,0.34) 42%, rgba(8,8,12,0) 70%);
}
.lcard .tags { position: absolute; bottom: 0; inset-inline-end: 0; display: flex; gap: 6px; z-index: 2; }
.tag {
  font-size: 11px; font-weight: 700; color: #DBEAFE;
  padding: 4px 9px; border-radius: 999px;
  background: var(--brand);
}
.lcard .count-pill {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,0.55); padding: 4px 9px; border-radius: 999px;
}
.lcard .overlay { position: absolute; inset-inline: 14px; bottom: 12px; z-index: 2; }
.lcard .l-title { font-size: 18px; font-weight: 800; color: #fff; margin: 0 0 3px; text-shadow: 0 1px 8px rgba(0,0,0,0.5); }
.lcard .l-sub { font-size: 13px; color: #e7e7ea; margin: 0 0 6px; }
.lcard .l-avail { display: inline-block; font-size: 12px; font-weight: 700; color: #34C759; margin-bottom: 6px; }
.lcard .l-price { font-size: 20px; font-weight: 900; color: #fff; }
.lcard .l-price small { font-size: 13px; font-weight: 600; color: #d4d4d8; }
.lcard .l-bills { font-size: 12px; font-weight: 700; color: #34C759; margin-inline-start: 8px; }

/* post card (looking / general) */
.pcard { padding: 14px 16px; }
.pcard .head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pcard .head-meta { flex: 1; min-width: 0; }
.pcard .head-right { flex: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-elev); object-fit: cover; flex: none; }
.avatar.ph { display: grid; place-items: center; color: var(--fg-faint); font-weight: 800; }
.pcard .name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.pcard .handle { font-size: 12px; color: var(--fg-faint); }
.chip-type {
  display: inline-block; font-size: 11px; font-weight: 700; color: #DBEAFE;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.chip-type.neutral { background: rgba(128,128,128,0.22); color: var(--fg-mid); }
.pcard .body { font-size: 15px; color: var(--fg); white-space: pre-wrap; word-break: break-word; }
.detail-rows { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.detail-rows .row { font-size: 13px; color: var(--fg-mid); display: flex; gap: 7px; align-items: center; }
.detail-rows .row b { color: var(--fg); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips .c {
  font-size: 12px; font-weight: 600; color: #DBEAFE;
  background: rgba(29,78,216,0.18); border: 1px solid rgba(59,130,246,0.35);
  padding: 4px 10px; border-radius: 999px;
}
html[data-theme="light"] .chips .c { color: #1D4ED8; background: rgba(29,78,216,0.09); border-color: rgba(29,78,216,0.28); }
.pgallery { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.pgallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: pointer; }

/* engagement row (display-only -> modal) */
.eng { display: flex; gap: 18px; margin-top: 12px; color: var(--fg-faint); font-size: 13px; }
.eng span { cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }

/* feed end CTA */
.feed-end { text-align: center; padding: 26px 16px 8px; }
.feed-end p { color: var(--fg-mid); margin: 0 0 14px; }

/* ---------- listing detail page ---------- */
.lp { max-width: 720px; margin: 0 auto; padding: 0 0 110px; }
/* photo carousel (one photo at a time, capped width on desktop) */
.gallery { position: relative; max-width: 720px; margin: 0 auto 4px; background: #000; aspect-ratio: 3 / 2; overflow: hidden; }
.gallery-track {
  display: flex; height: 100%; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; direction: ltr;
  touch-action: pan-x; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { min-width: 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; flex: none; }
.gallery.single { aspect-ratio: auto; }
.gallery.single img { max-height: min(70vh, 560px); width: 100%; object-fit: contain; }
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,0.5); color: #fff; font-size: 24px; line-height: 1;
  display: grid; place-items: center; backdrop-filter: blur(4px); transition: background 0.15s;
}
.gal-nav:hover { background: rgba(0,0,0,0.78); }
.gal-nav.prev { inset-inline-start: 12px; } .gal-nav.next { inset-inline-end: 12px; }
.gallery-dots { position: absolute; bottom: 12px; inset-inline-start: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.gallery-dots .dot { all: unset; cursor: pointer; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.45); transition: background 0.15s, transform 0.15s; }
.gallery-dots .dot.active { background: #fff; transform: scale(1.25); }
.gallery-count { position: absolute; top: 12px; inset-inline-end: 12px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,0.5); padding: 3px 9px; border-radius: 999px; }
@media (max-width: 560px) { .gal-nav { width: 34px; height: 34px; font-size: 20px; } }
.lp .pad { padding: 18px 18px 0; }
.lp h1 { font-size: 24px; font-weight: 800; margin: 4px 0 8px; }
.lp .price { font-size: 26px; font-weight: 900; }
.lp .price small { font-size: 15px; font-weight: 600; color: var(--fg-mid); }
.lp .price .bills { font-size: 13px; font-weight: 700; color: #34C759; margin-inline-start: 10px; }
.lp .loc { color: var(--fg-mid); margin: 8px 0; font-size: 15px; }
.lp .stats { display: flex; gap: 22px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 12px 0; }
.lp .stat { text-align: center; }
.lp .stat .n { font-size: 18px; font-weight: 800; }
.lp .stat .k { font-size: 12px; color: var(--fg-faint); }
.lp .avail { color: #34C759; font-weight: 700; font-size: 14px; margin: 6px 0 14px; display: flex; align-items: center; gap: 7px; }
.lp h2 { font-size: 16px; font-weight: 700; margin: 22px 0 10px; }
.lp .desc { color: var(--fg); white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.lp .owner { display: flex; align-items: center; gap: 10px; margin: 20px 0 4px; }
.lp .owner .name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 4px; }

/* sticky contact bar -> modal */
.contact-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 25;
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 12px max(16px, calc((100% - 720px) / 2)) calc(12px + env(safe-area-inset-bottom));
  background: rgba(10,10,10,0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.contact-bar { background: var(--bar-bg); }
.contact-bar .label { font-size: 13px; color: var(--fg-mid); }
.contact-bar .cta { cursor: pointer; border: none; background: var(--accent); color: #00140c; font-weight: 800; padding: 11px 20px; border-radius: 12px; font-size: 14px; }

/* ---------- download modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,0.66); backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  width: 100%; max-width: 380px; background: var(--bg-card);
  border: 1px solid var(--border-strong); border-radius: 22px; padding: 26px 22px;
  text-align: center;
}
.modal .logo { font-size: 30px; font-weight: 900; letter-spacing: -1px; margin: 0 0 6px; }
.modal h3 { font-size: 19px; font-weight: 800; margin: 0 0 6px; }
.modal p { color: var(--fg-mid); font-size: 14px; margin: 0 0 20px; }
.modal .store-badges { flex-direction: column; }
.modal .store-badge { width: 100%; justify-content: center; }
.modal .close { all: unset; cursor: pointer; margin-top: 16px; color: var(--fg-faint); font-size: 13px; font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { text-align: center; padding: 30px 16px 40px; border-top: 1px solid var(--border); margin-top: 20px; }
.site-footer a { color: var(--fg-mid); font-size: 13px; }
.site-footer .sep { color: var(--fg-faint); margin: 0 8px; }

/* unavailable page */
.unavail { max-width: 460px; margin: 0 auto; text-align: center; padding: 80px 24px; }
.unavail h1 { font-size: 24px; font-weight: 800; }
.unavail p { color: var(--fg-mid); }

@media (max-width: 480px) {
  .hero .wordmark { font-size: 42px; }
  .hero { padding: 32px 16px 20px; }
}
