/* Shared nav + footer styles for the marketing landing AND the legal pages.
   Loaded by index.html, /privacy/, and /terms/. The nav/footer markup
   itself is injected by chrome.js into <div id="ac-nav"> + <div id="ac-footer">
   placeholders, so the same styles apply to all three. */

/* Brand tokens — duplicated from landing's :root because chrome.css can be
   loaded by pages that don't have the marketing landing's full token set
   (e.g. /privacy/, which uses legal.css for body styling). Kept in sync
   with apps/landing/index.html ':root' block. */
:root {
  --paper:#FBF6EC;
  --paper-2:#F3ECDC;
  --paper-3:#DBD4C5;
  --paper-4:#C5BCA8;
  --ink:#1E1B17;
  --ink-2:#4F5160;
  --ink-3:#8A8275;
  --brand:#279f8e;
  --brand-deep:#1f8276;
}

/* .wrap is the landing's container — 1200 px max with 32 px gutter.
   Both the nav and footer use it; the legal page body uses its own
   narrower .legal-content inside .wrap so paragraphs stay readable. */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* ========== NAV ========== */
nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  background: oklch(0.985 0.005 80 / 0.78);
  border-bottom: 1px solid var(--paper-3);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 22px; letter-spacing: -0.01em; text-decoration: none; color: inherit; }
.logo-img { height: 72px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 16px; font-weight: 400; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  padding: 10px 22px; border-radius: 999px;
  background: var(--brand); color: var(--paper);
  text-decoration: none; font-weight: 700; font-size: 16px;
  transition: transform 120ms ease, background 160ms ease;
  white-space: nowrap;
}
.nav-cta:hover { transform: translateY(-1px); color: var(--paper); background: var(--brand-deep); }
.lang-switch-select {
  appearance: none;
  -webkit-appearance: none;
  margin-right: 14px;
  padding: 7px 28px 7px 14px;
  background: var(--paper-2)
    url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%237a7066' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='4 6 8 10 12 6'/%3e%3c/svg%3e")
    no-repeat right 8px center / 14px;
  border: 1px solid var(--paper-3);
  border-radius: 999px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  color: var(--ink-2); cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.lang-switch-select:hover { color: var(--ink); border-color: var(--paper-4); }
.lang-switch-select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ========== FOOTER ========== */
footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--paper-3);
}
.foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.foot-col h4 {
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 18px;
}
.foot-col a {
  display: block;
  font-size: 15px; color: var(--ink-2);
  text-decoration: none; padding: 6px 0;
}
.foot-col a:hover { color: var(--ink); }
.foot-blurb {
  font-size: 15px; color: var(--ink-2); line-height: 1.55;
  margin-top: 16px; max-width: 320px;
}
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px; border-top: 1px solid var(--paper-3);
  font-size: 13px; color: var(--ink-3);
}
.foot-bottom a { color: inherit; text-decoration: none; }
.foot-bottom a:hover { color: var(--ink); }
.foot-bottom .made { display: inline-flex; align-items: center; gap: 8px; }
.heart { color: oklch(0.60 0.18 25); }

/* ========== RESPONSIVE ========== */
@media (max-width: 920px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .lang-switch-select { margin-right: 8px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-bottom { flex-direction: column; gap: 14px; align-items: flex-start; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .nav-row { padding: 12px 0; }
  .logo-img { height: 44px; }
  .nav-cta { padding: 9px 16px; font-size: 14px; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ========== RTL (Arabic) tweaks ========== */
html[lang="ar"] .lang-switch-select {
  background-position: left 8px center;
  padding: 7px 14px 7px 28px;
  margin-right: 0; margin-left: 14px;
}
html[lang="ar"] .foot-blurb { margin-left: auto; margin-right: 0; }
