/* PrimePaire site layout & components */

html { scroll-padding-top: 90px; }

body { overflow-x: hidden; }

.skip-link {
  position: absolute;
  top: .5rem;
  inset-inline-start: .5rem;
  z-index: 2000;
  background: var(--ink);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: var(--radius-pill);
}

main { display: block; }

.section { padding: 5rem 0; position: relative; }
.section-tight { padding: 3.5rem 0; }
.section-white { background: #fff; }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .75rem;
}

.eyebrow-brass { color: var(--brass-dark); }

.lead { color: var(--muted); font-size: 1.15rem; }

.section-head { max-width: 680px; margin: 0 auto 3rem; text-align: center; }

/* ---------- Navbar ---------- */

.site-nav {
  padding: 1rem 0;
  background: transparent;
}

.site-nav.is-scrolled,
.site-nav.is-open {
  background: #fff;
  box-shadow: 0 6px 18px rgba(14, 34, 51, .1);
  padding: .55rem 0;
}

.brand-word {
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-mark { border-radius: 10px; }

.site-nav .nav-link {
  font-weight: 600;
  color: var(--ink);
  padding: .5rem .9rem !important;
  border-radius: var(--radius-pill);
}

.site-nav .nav-link:hover { color: var(--brand); }

.site-nav .nav-link.active {
  color: var(--brand-dark);
  background: rgba(31, 111, 168, .1);
}

/* Language switcher */
.lang-switch .dropdown-toggle { border-radius: var(--radius-pill); font-weight: 600; padding: .4rem .85rem; }
.lang-switch .dropdown-menu { border-radius: 14px; }

.navbar-toggler { border: 0; padding: .5rem; border-radius: 12px; }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(31, 111, 168, .35); }

@media (max-width: 991.98px) {
  .site-nav .navbar-collapse { padding-top: 1rem; }
  .site-nav .nav-link { padding: .65rem .9rem !important; }
}

/* ---------- Heroes ---------- */

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 8.5rem 0 5rem;
  background: linear-gradient(180deg, #EAF1F6 0%, var(--surface) 100%);
}

.page-hero { padding: 8rem 0 4rem; text-align: center; }
.page-hero .lead { max-width: 640px; margin: 0 auto; }

.hero > .container,
.page-hero > .container { position: relative; z-index: 1; }

.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-match {
  background: var(--gradient-match);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-note { font-size: .9rem; color: var(--muted); }

/* ---------- Phone mockup + swipe stack ---------- */

.phone {
  position: relative;
  width: min(300px, 84vw);
  aspect-ratio: 9 / 18.5;
  margin: 0 auto;
  border-radius: 44px;
  background: var(--ink);
  padding: 12px;
  box-shadow: 0 30px 60px rgba(14, 34, 51, .35), inset 0 0 0 2px rgba(255, 255, 255, .08);
}

.phone::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  width: 90px;
  height: 22px;
  transform: translateX(-50%);
  background: var(--ink);
  border-radius: 20px;
  z-index: 5;
}

.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 44px 16px 8px;
  font-weight: 800;
  font-size: .9rem;
}

.app-bar .coins {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  color: var(--brass-dark);
  background: rgba(184, 134, 43, .14);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.swipe-stack {
  position: relative;
  flex: 1;
  margin: 6px 14px 0;
}

.swipe-card {
  position: absolute;
  inset: 0 0 24px 0;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
  transform-origin: 50% 100%;
}

/* Static stacking, used when motion is reduced. */
.swipe-card:nth-child(1) { z-index: 3; }
.swipe-card:nth-child(2) { z-index: 2; transform: translateY(12px) scale(.95); }
.swipe-card:nth-child(3) { z-index: 1; transform: translateY(24px) scale(.9); }
.swipe-card:nth-child(4) { z-index: 0; transform: translateY(24px) scale(.9); }

.swipe-photo {
  position: relative;
  height: 68%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .85);
  font-size: 4.5rem;
}

.swipe-photo.p1 { background: linear-gradient(160deg, #7FA8C4 0%, #1F6FA8 55%, #0E2233 100%); }
.swipe-photo.p2 { background: linear-gradient(160deg, #D9B66E 0%, #B8862B 45%, #0E2233 100%); }
.swipe-photo.p3 { background: linear-gradient(160deg, #9DC0B0 0%, #2E7D4F 50%, #0E2233 100%); }
.swipe-photo.p4 { background: linear-gradient(160deg, #E3B3A8 0%, #B5525C 50%, #0E2233 100%); }

/* Illustrated profile avatar (public/img/avatars, see scripts/generate-avatars.mjs),
   anchored to the bottom of the photo area like a portrait. */
.swipe-avatar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 94%;
  width: auto;
  pointer-events: none;
  user-select: none;
}

.photo-dots {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
}

.photo-dots span {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .45);
}

.photo-dots span:first-child { background: #fff; }

.swipe-info { padding: 10px 14px; }
.swipe-info .name { font-weight: 800; font-size: 1rem; margin: 0; }
.swipe-info .meta { font-size: .72rem; color: var(--muted); margin: 0 0 6px; }

.chip {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 8px;
  margin: 0 2px 4px 0;
  border-radius: var(--radius-pill);
  background: rgba(31, 111, 168, .1);
  color: var(--brand-dark);
}

.stamp {
  position: absolute;
  top: 34px;
  padding: 2px 10px;
  border: 3px solid currentColor;
  border-radius: 8px;
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: .08em;
  opacity: 0;
  background: rgba(255, 255, 255, .85);
}

.stamp-like { left: 14px; color: var(--success); --stamp-rot: -14deg; }
.stamp-nope { right: 14px; color: var(--alarm); --stamp-rot: 14deg; }

.swipe-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 10px 0 18px;
}

.swipe-actions span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-size: 1.15rem;
}

.swipe-actions .pass { color: var(--alarm); }
.swipe-actions .super { color: var(--brand); width: 38px; height: 38px; align-self: center; font-size: 1rem; }
.swipe-actions .like { color: var(--success); }

.hero-visual { position: relative; padding: 1rem 0 2rem; }

.match-pill {
  position: absolute;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: var(--shadow-card);
  font-weight: 800;
  font-size: .85rem;
}

.match-pill .bi { color: var(--brass); }
.match-pill.one { top: 18%; left: max(0px, calc(50% - 230px)); }
.match-pill.two { bottom: 22%; right: max(0px, calc(50% - 230px)); }

@media (max-width: 575.98px) {
  .match-pill { display: none; }
}

/* ---------- Stats strip ---------- */

.stats-strip {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2rem 1rem;
  margin-top: -2.5rem;
  position: relative;
  z-index: 2;
}

.stat-number {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 900;
  line-height: 1;
  color: var(--brand);
}

.stat-label { font-weight: 600; color: var(--muted); margin: .4rem 0 0; font-size: .95rem; }

/* ---------- Generic feature / step cards ---------- */

.icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: #fff;
  background: var(--gradient);
  flex-shrink: 0;
}

.icon-badge.brass { background: var(--gradient-match); }
.icon-badge.soft { background: rgba(31, 111, 168, .12); color: var(--brand); }

.feature-card {
  height: 100%;
  padding: 1.75rem;
  border: 0;
  background: #fff;
  color: inherit;
  text-decoration: none;
  display: block;
}

.feature-card:hover { color: inherit; }
.feature-card h3 { font-size: 1.15rem; margin: 1.1rem 0 .5rem; }
.feature-card p { color: var(--muted); margin: 0; }
.feature-card .more { display: inline-block; margin-top: 1rem; font-weight: 700; color: var(--brand); }

.step {
  position: relative;
  text-align: center;
  padding: 2rem 1.5rem;
  height: 100%;
}

.step .step-num {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1.25rem;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--divider);
  line-height: 1;
}

.step .icon-badge { margin: 0 auto 1.25rem; width: 68px; height: 68px; font-size: 1.8rem; border-radius: 20px; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Features page rows ---------- */

.feature-row { padding: 3.5rem 0; }
.feature-row + .feature-row { border-top: 1px solid var(--divider); }
.feature-row h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.feature-row p { color: var(--muted); }

.feature-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.feature-list li { display: flex; gap: .6rem; margin-bottom: .5rem; }
.feature-list .bi { color: var(--success); flex-shrink: 0; margin-top: .1rem; }

.feature-art {
  position: relative;
  min-height: 280px;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-card);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 2rem;
}

.feature-art::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--gradient);
  opacity: .1;
  top: -80px;
  right: -60px;
}

.feature-art .big-icon {
  width: 120px;
  height: 120px;
  border-radius: 34px;
  display: grid;
  place-items: center;
  font-size: 3.4rem;
  color: #fff;
  background: var(--gradient);
  box-shadow: var(--shadow-lift);
  position: relative;
}

.feature-art .big-icon.brass { background: var(--gradient-match); }

.mini-ui {
  position: relative;
  width: 100%;
  max-width: 300px;
}

.bubble {
  max-width: 80%;
  padding: .55rem .9rem;
  border-radius: 18px;
  margin-bottom: .5rem;
  font-size: .9rem;
  font-weight: 500;
}

.bubble.in { background: var(--surface); border: 1px solid var(--divider); border-end-start-radius: 6px; }
.bubble.out { background: var(--brand); color: #fff; margin-inline-start: auto; border-end-end-radius: 6px; }

.ui-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 1rem;
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: .5rem;
  font-weight: 600;
  font-size: .9rem;
}

.ui-row .bi { color: var(--brand); }

.range-mock {
  height: 6px;
  border-radius: 6px;
  background: var(--divider);
  position: relative;
  margin: .4rem 0 1rem;
}

.range-mock span {
  position: absolute;
  inset: 0 40% 0 10%;
  border-radius: 6px;
  background: var(--gradient);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  width: 100%;
  max-width: 280px;
  position: relative;
}

.photo-grid div {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .9);
  font-size: 1.4rem;
}

.photo-grid div:nth-child(1) { background: linear-gradient(160deg, #7FA8C4, #1F6FA8); }
.photo-grid div:nth-child(2) { background: linear-gradient(160deg, #D9B66E, #8C6821); }
.photo-grid div:nth-child(3) { background: linear-gradient(160deg, #9DC0B0, #2E7D4F); }
.photo-grid div:nth-child(4) { background: linear-gradient(160deg, #1F6FA8, #0E2233); }
.photo-grid div:nth-child(5) { background: linear-gradient(160deg, #B8862B, #0E2233); }
.photo-grid div:nth-child(6) { background: transparent; border: 2px dashed #C9CFCC; color: var(--muted); }

.notif {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .8rem 1rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--divider);
  margin-bottom: .6rem;
  font-size: .88rem;
  text-align: start;
}

.notif strong { display: block; }
.notif .bi { font-size: 1.2rem; color: var(--brand); }
.notif .bi.brass { color: var(--brass); }

.lang-list { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; position: relative; }

.lang-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--divider);
  font-weight: 600;
}

.flag { font-size: 1.3rem; line-height: 1; }

/* ---------- Pricing ---------- */

.currency-switch .btn {
  --bs-btn-padding-x: 1rem;
  --bs-btn-padding-y: .45rem;
  --bs-btn-font-size: .9rem;
}

.currency-switch .btn-check:checked + .btn {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.price-card {
  height: 100%;
  padding: 2rem 1.5rem;
  background: #fff;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  position: relative;
}

.price-card h2 { font-size: 1.15rem; margin-bottom: .25rem; }
.price-card .price { font-size: 2.4rem; font-weight: 900; line-height: 1.1; margin: .75rem 0 .1rem; color: var(--ink); }
.price-card .per { color: var(--muted); font-size: .9rem; }
.price-card ul { list-style: none; padding: 0; margin: 1.5rem 0; flex: 1; }
.price-card li { display: flex; gap: .55rem; margin-bottom: .6rem; font-size: .95rem; }
.price-card li .bi { color: var(--success); margin-top: .1rem; flex-shrink: 0; }
.price-card .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: .45em .9em; }

.price-card.premium .price { color: var(--ink); }
.price-card.best { border-color: var(--brass); }
.price-card.best .price { background: var(--gradient-match); -webkit-background-clip: text; background-clip: text; color: transparent; }

.compare-table {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.compare-table table { margin: 0; }
.compare-table th, .compare-table td { padding: 1rem 1.25rem; vertical-align: middle; }
.compare-table thead th { background: var(--ink); color: #fff; font-weight: 800; border: 0; }
.compare-table thead th.premium-col { background: var(--brass-dark); }
.compare-table td.text-center .bi-check-circle-fill { color: var(--success); font-size: 1.2rem; }
.compare-table td.text-center .bi-dash-lg { color: #8A969E; font-size: 1.2rem; }

.teaser-card { padding: 2rem; height: 100%; background: #fff; }
.teaser-card.premium { background: var(--gradient-match); color: #fff; }
.teaser-card.premium h3, .teaser-card.premium .price { color: #fff; }
.teaser-card .price { font-size: 2.2rem; font-weight: 900; }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--gradient);
  color: #fff;
  border-radius: 28px;
  padding: 4rem 2rem;
  text-align: center;
}

.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta-band p { color: rgba(255, 255, 255, .88); max-width: 560px; margin: 0 auto 2rem; }
.cta-band .blob { opacity: .35; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band > .blob { position: absolute; z-index: 0; }

.btn-white {
  background: #fff;
  color: var(--brand-dark);
  border: 0;
}

.btn-white:hover, .btn-white:focus-visible { background: #fff; color: var(--ink); }

.btn-outline-light:focus-visible, .btn-white:focus-visible, .btn-light:focus-visible { outline-color: #fff; }

/* ---------- Safety ---------- */

.info-card { padding: 2rem; background: #fff; height: 100%; }
.info-card h3 { font-size: 1.2rem; margin: 1.1rem 0 .5rem; }
.info-card p { color: var(--muted); margin: 0; }

.info-card.soon {
  border: 2px dashed rgba(184, 134, 43, .55);
  box-shadow: none;
  background: #FFFDF8;
}

.distance-demo {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1rem;
  padding: .4rem .9rem;
  border-radius: var(--radius-pill);
  background: rgba(31, 111, 168, .1);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: .9rem;
}

.tips-list { list-style: none; padding: 0; margin: 0; counter-reset: tip; }

.tips-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  margin-bottom: .75rem;
}

.tips-list .bi { font-size: 1.4rem; color: var(--success); flex-shrink: 0; }
.tips-list strong { display: block; }
.tips-list span { color: var(--muted); }

/* ---------- About ---------- */

.value-card { padding: 1.75rem; background: #fff; height: 100%; }
.value-card h3 { font-size: 1.15rem; margin: 1rem 0 .4rem; }
.value-card p { color: var(--muted); margin: 0; }

.platform-card { padding: 2rem; background: #fff; height: 100%; display: flex; flex-direction: column; }
.platform-card p { color: var(--muted); flex: 1; }

/* ---------- Contact ---------- */

.contact-card { padding: 2rem; background: #fff; }
@media (min-width: 768px) { .contact-card { padding: 2.5rem; } }

.invalid-feedback { font-weight: 600; }

/* ---------- 404 ---------- */

.not-found-code {
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 900;
  line-height: 1;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, .78);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .btn { text-decoration: none; }
.site-footer .btn-light { color: var(--ink); }
.site-footer .btn-light:hover { color: var(--ink); text-decoration: none; }
.site-footer .btn-outline-light:hover { color: var(--ink); text-decoration: none; }

.footer-tagline { font-size: 1.05rem; max-width: 280px; }

.footer-heading {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-links li { margin-bottom: .5rem; }
.footer-divider { border-color: rgba(255, 255, 255, .18); opacity: 1; margin: 2.5rem 0 1.5rem; }

/* ---------- Back to top ---------- */

.back-to-top {
  position: fixed;
  inset-inline-end: 1.25rem;
  bottom: 1.25rem;
  z-index: 1030;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: var(--shadow-card);
}

.back-to-top:hover { box-shadow: var(--shadow-lift); }

/* ---------- Right-to-left (Arabic) ---------- */
/* Latin text stays in Inter; Arabic glyphs come from Noto Sans Arabic (loaded only on /ar pages). */
html[lang="ar"] {
  --font-sans: "Inter", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

/* Letter-spacing breaks the joins between Arabic letters. */
html[lang="ar"] body * { letter-spacing: 0 !important; }

/* Arrows that mean "forward" point the other way in RTL. */
[dir="rtl"] .bi-arrow-right::before,
[dir="rtl"] .bi-arrow-up-right::before,
[dir="rtl"] .bi-chevron-right::before { display: inline-block; transform: scaleX(-1); }
