/* Task 255 / 256 -- campaign design on every CLIENT page.
 *
 * Owner-approved look of the campaign landing page (campaign-landing/style.css):
 * paper background, deep green + one gold accent, Manrope + IBM Plex Sans Arabic
 * (self-hosted, no CDN), AH logo badge header with the licence line, green hero
 * card with a gold rule, white cards, big rounded buttons.
 *
 * Loaded by templates/_head.html (client pages) and privacy.html only. Staff
 * (/admin) and agency (/agency) pages never load it. Every rule is under
 * `html body.cc`, which beats style.css and catalog.css on specificity so the
 * client pages look the same whichever of those they also load. Logical
 * properties throughout, so Arabic mirrors itself. No text lives here.
 */

@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/manrope-latin-var.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/static/fonts/plex-arabic-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/static/fonts/plex-arabic-600.woff2") format("woff2");
  font-weight: 500 800; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

html body.cc {
  --g-950: #072a22;
  --g-900: #0a3a2f;
  --g-800: #0a4f41;
  --g-700: #0f6e5b;
  --g-100: #dcefe8;
  --g-50:  #eef7f3;
  --gold-500: #c9962f;
  --gold-100: #f7ecd2;
  --paper: #f6f2e9;
  --sand-200: #e2d9c6;
  --ink-900: #14231f;
  --ink-500: #5a6862;
  --cc-w: 560px;
  --brand: #0f6e5b;
  --brand-dark: #0a4f41;
  --font: "Manrope", "IBM Plex Sans Arabic", "Noto Sans Ethiopic", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;

  zoom: 1;
  border: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-900);
  background: var(--paper);
  background-image: none;
  -webkit-text-size-adjust: 100%;
}
html[dir="rtl"] body.cc { line-height: 1.7; }
html body.cc.catalog-page { --cc-w: 1280px; }
html body.cc :where(input, select, button, textarea) { font-family: var(--font); }

/* ---- Header: AH badge + name + language pill, then the licence line ---- */
html body.cc .cc-head { position: sticky; top: 0; z-index: 5; background: var(--g-800); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
html body.cc .cc-brand { display: flex; align-items: center; gap: 10px; max-width: var(--cc-w); margin: 0 auto; padding: 10px 16px 6px; }
html body.cc .cc-brand img { flex: none; border-radius: 9px; }
html body.cc .cc-name { font-weight: 800; font-size: 18px; letter-spacing: .2px; min-width: 0; }
html body.cc .cc-lang {
  margin-inline-start: auto; flex: none;
  color: #fff; font-weight: 700; font-size: 15px; line-height: 1.3;
  padding: 6px 12px; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; text-decoration: none;
}
html body.cc .cc-lang:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }
html body.cc .cc-licence {
  margin: 0 auto; padding: 6px 16px 9px; max-width: var(--cc-w);
  font-size: 14px; font-weight: 600; color: var(--gold-100); font-variant-numeric: tabular-nums;
}

/* ---- Page title: the green hero card with the gold rule ---- */
html[dir] body.cc.cc header.topbar {
  display: block; text-align: start;
  max-width: calc(var(--cc-w) - 32px); margin: 18px 16px 0;
  padding: 22px 20px 20px;
  border-radius: 18px; border-bottom: 4px solid var(--gold-500);
  background: linear-gradient(150deg, var(--g-700), var(--g-900));
  box-shadow: 0 10px 26px rgba(10,58,47,.22);
  color: #fff;
}
@media (min-width: 592px) { html body.cc header.topbar { margin-inline: auto; width: calc(var(--cc-w) - 32px); } }
html body.cc header.topbar h1 { margin: 0; font-size: 26px; line-height: 1.3; font-weight: 800; color: #fff; letter-spacing: 0; }
html body.cc header.topbar h1::before { content: none; display: none; }
html body.cc header.topbar > h1 + p, html body.cc header.topbar p { margin: 8px 0 0; font-size: 16px; line-height: 1.5; font-weight: 500; color: #fff; opacity: 1; grid-column: auto; grid-row: auto; justify-self: auto; }
html body.cc header.topbar a { color: #fff; }
html body.cc header.topbar .topbar-nav-btn,
html body.cc header.topbar .logout-link,
html body.cc header.topbar .topbar-login-btn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55); background: transparent; color: #fff;
  font-size: 15px; font-weight: 700; text-decoration: none; white-space: normal;
}
html body.cc header.topbar .topbar-login-btn { background: #fff; color: var(--g-800); border-color: #fff; }
html body.cc header.topbar a:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }

/* ---- Main column ---- */
html body.cc main { max-width: var(--cc-w); margin: 0 auto; padding: 20px 16px 8px; }
html body.cc.catalog-page main { padding: 24px 16px 8px; }
html body.cc h2 { color: var(--g-900); font-weight: 800; }
html body.cc .muted { color: var(--ink-500); }
html body.cc .error-msg { color: #b3261e; font-weight: 700; }
html body.cc .success-msg { color: var(--g-800); font-weight: 700; }
html body.cc a { color: var(--g-700); }

html body.cc .card {
  background: #fff; border: 1px solid var(--sand-200); border-radius: 14px;
  padding: 16px; margin-bottom: 16px; box-shadow: none;
}
html body.cc .disclaimer { background: var(--gold-100); border: 1px solid var(--gold-500); border-radius: 14px; color: var(--ink-900); }
html body.cc .badge.available { background: var(--g-100); color: var(--g-800); }

/* ---- Buttons: landing style (big, rounded 14px) ---- */
html body.cc .btn {
  min-height: 56px; padding: 12px 18px; border-radius: 14px;
  border: 2px solid var(--g-700); background: var(--g-700); color: #fff;
  font-size: 18px; font-weight: 800; line-height: 1.3; text-decoration: none; text-align: center;
  align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(10,79,65,.22);
}
html body.cc:not(.catalog-page) .btn { display: flex; }
html body.cc .btn:hover, html body.cc .btn:active { background: var(--g-800); border-color: var(--g-800); }
html body.cc .btn:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; }
html body.cc .btn.secondary { background: #fff; color: var(--g-800); border: 2px solid var(--g-700); box-shadow: none; min-height: 50px; font-size: 17px; }
html body.cc .btn.secondary:hover, html body.cc .btn.secondary:active { background: var(--g-50); }
html body.cc button.btn:disabled { background: #e9e4d6; color: var(--ink-500); border-color: var(--sand-200); box-shadow: none; }

/* ---- Fields ---- */
html body.cc input[type=text], html body.cc input[type=tel], html body.cc input[type=number], html body.cc input[type=date],
html body.cc input[type=password], html body.cc input[type=email], html body.cc select, html body.cc textarea {
  border: 1px solid var(--sand-200); border-radius: 12px; background: #fff; color: var(--ink-900);
}
html body.cc input:focus-visible, html body.cc select:focus-visible, html body.cc textarea:focus-visible {
  outline: 3px solid var(--gold-500); outline-offset: 1px; border-color: var(--g-700);
}
html body.cc label { color: var(--ink-900); font-weight: 600; }

/* ---- Footer: paper, same as the landing page footer ---- */
html body.cc .site-footer {
  max-width: var(--cc-w); margin: 12px auto 0; padding: 16px 16px 28px;
  background: transparent; border: 0; border-top: 1px solid var(--sand-200); border-radius: 0;
  font-size: 14px; line-height: 1.7; color: var(--ink-500); text-align: start;
}
html body.cc .site-footer a { color: var(--g-700); text-decoration: underline; text-underline-offset: 3px; }
html body.cc .site-footer a:hover { color: var(--g-900); }

/* ---- Privacy page ---- */
html body.cc .privacy { max-width: var(--cc-w); }

@media (max-width: 719px) {
  html body.cc.catalog-page header.topbar { margin: 18px 16px 0; padding: 22px 20px 20px; }
  html body.cc .card { padding: 16px; }
  html body.cc .site-footer { margin: 12px auto 0; }
}
@media (min-width: 720px) {
  html body.cc header.topbar h1 { font-size: 30px; }
  html body.cc.catalog-page header.topbar { max-width: 1232px; margin-inline: auto; width: calc(100% - 48px); }
}
