/* =====================================================================
 *  Public pages — homepage, privacy, terms, contact, data-deletion
 *  Hudhud Iraq brand (uiux/Hudhud-Iraq-Brand-Guidelines.pdf): the brand
 *  lives on navy; cream for lines and text on navy, sand for secondary
 *  text, and crest red for one thing per layout. Colours and the 'Hudhud'
 *  typeface come from fonts/fonts.css. Self-contained otherwise: doesn't
 *  depend on the app's styles.css.
 * ===================================================================== */

:root {
  --navy:        var(--hh-navy);
  --navy-2:      var(--hh-navy-2);
  --deep:        var(--hh-deep);
  --cream:       var(--hh-cream);
  --sand:        var(--hh-sand);
  --crest:       var(--hh-crest);
  --crest-ink:   var(--hh-crest-ink);
  /* text and surfaces on the light (paper) parts */
  --ink:         #141B2D;
  --ink-2:       #2C3446;
  --ink-3:       #475069;
  --muted:       #636B80;
  --line:        #E8E1D3;
  --line-2:      #D8CEBB;
  --bg:          #FAF7F0;
  --panel:       #F4EFE4;
  --card:        #FFFFFF;
  /* the interactive colour on paper: Navy 2 */
  --blue:        var(--hh-navy-2);
  --blue-dark:   var(--hh-navy);
  --blue-soft:   #E8ECF5;
  /* text on navy */
  --on-navy:     var(--hh-cream);
  --on-navy-2:   rgba(255,241,215,.74);
  --on-navy-3:   rgba(255,241,215,.56);
  --navy-line:   rgba(255,241,215,.12);
  --max:         1160px;
  --shadow-card: 0 1px 2px rgba(13,27,62,.04), 0 12px 32px -18px rgba(13,27,62,.22);
}
*  { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--crest); outline-offset: 3px; border-radius: 6px; }

/* ---- shared header / footer --------------------------------------- */
.site-header {
  background: var(--navy);
  border-bottom: 1px solid var(--navy-line);
  position: sticky; top: 0; z-index: 10;
}
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; flex: none; line-height: 0; }
.brand img { display: block; height: 35px; width: auto; }
.brand:hover { text-decoration: none; }
.nav-links {
  display: flex; gap: 26px; margin-inline-start: auto;
  font-size: 14px; font-weight: 500;
}
.nav-links a { color: var(--on-navy-2); transition: color .15s; }
.nav-links a:hover { color: var(--on-navy); text-decoration: none; }
.nav-cta {
  color: var(--on-navy);
  padding: 8px 20px; border-radius: 999px;
  border: 1px solid rgba(216,193,159,.55);
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.nav-cta:hover { background: rgba(255,241,215,.08); border-color: var(--sand); text-decoration: none; }

.site-footer {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--deep);
  color: var(--on-navy-2);
  margin-top: 88px;
  padding: 56px 24px 28px;
}
/* the tonal supergraphic: the bird, huge and quiet, behind the footer */
.site-footer::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset-block: -10% -40%; inset-inline-end: -12%; width: 70%;
  background: url(/brand/supergraphic-tonal.svg) center / contain no-repeat;
  opacity: .55;
}
.foot-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.foot-grid .brand img { height: 38px; }
.foot-about { color: var(--on-navy-2); font-size: 14px; max-width: 340px; margin: 16px 0 6px; }
.foot-tag { margin: 0; font-size: 13px; color: var(--sand); }
.foot-tag span { color: var(--on-navy-3); margin-inline-start: 6px; font-size: 12px; }
.foot-grid h4 {
  font-size: 13px; font-weight: 600; letter-spacing: 0;
  color: var(--sand); margin: 6px 0 14px;
}
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid a { color: var(--on-navy-2); font-size: 14px; }
.foot-grid a:hover { color: var(--on-navy); }
.foot-grid p { color: var(--on-navy-2); }
.foot-bottom {
  max-width: var(--max);
  margin: 40px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--navy-line);
  color: var(--on-navy-3); font-size: 13px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ---- buttons -------------------------------------------------------- */
.btn-primary, .btn-ghost, .btn-cream {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px; border-radius: 999px;
  font-weight: 700; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn-primary:hover, .btn-ghost:hover, .btn-cream:hover { text-decoration: none; }
.btn-primary:active, .btn-ghost:active, .btn-cream:active { transform: translateY(1px); }
/* the crest: white on red is only legible large and bold (3.3:1), so 19px/700 */
.btn-primary { background: var(--crest); color: #fff; font-size: 19px; }
.btn-primary:hover { background: #E8430F; }
.btn-ghost {
  color: var(--on-navy); font-size: 16px;
  border: 1.5px solid rgba(216,193,159,.6);
}
.btn-ghost:hover { border-color: var(--sand); background: rgba(255,241,215,.06); }
.btn-cream { background: var(--cream); color: var(--navy); font-size: 17px; }
.btn-cream:hover { background: #fff; }

/* ---- homepage: hero ------------------------------------------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--navy);
  color: var(--on-navy);
}
.hero-in {
  max-width: var(--max); margin: 0 auto;
  padding: 64px 24px 72px;
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: center; gap: 24px;
}
.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 22px; font-size: 14px; font-weight: 600; color: var(--sand);
}
.kicker::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: currentColor; }
.hero h1 {
  font-size: clamp(34px, 3.9vw, 52px); line-height: 1.5; margin: 0 0 22px;
  font-weight: 700; color: var(--on-navy);
}
.hero h1 .crest { display: block; color: var(--crest); }
.hero-lead {
  font-size: 17px; line-height: 2; color: var(--on-navy-2);
  max-width: 560px; margin: 0 0 34px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-en {
  margin: 26px 0 0; font-size: 13.5px; color: var(--on-navy-3);
  text-align: right; letter-spacing: .01em;
}
.hero-art { position: relative; align-self: stretch; min-height: 420px; }
.hero-bird {
  position: absolute; inset-block-start: 50%; inset-inline-end: -14%;
  width: 116%; max-width: none; height: auto; transform: translateY(-50%);
}
/* two of the messages it carries, as they arrive on the customer's phone */
.bubble {
  position: absolute; max-width: 280px;
  padding: 11px 15px 8px; border-radius: 18px;
  background: #fff; color: #1C2233;
  font-size: 14px; line-height: 1.75;
  box-shadow: 0 22px 40px -18px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.18);
  opacity: 0; animation: bubbleIn .6s cubic-bezier(.2,.8,.2,1) forwards;
}
.bubble b { font-family: var(--font); font-weight: 700; letter-spacing: .06em; direction: ltr; unicode-bidi: isolate; }
.bubble .tick {
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
  margin-top: 2px; font-size: 11px; color: #7A8195; direction: ltr;
}
.bubble .tick svg { color: #34B7F1; }
.bubble.b1 { inset-inline-start: 0; top: 7%; border-start-start-radius: 6px; animation-delay: .35s; }
.bubble.b2 { inset-inline-start: -4%; bottom: -3%; border-start-start-radius: 6px; background: var(--cream); animation-delay: .9s; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; opacity: 1; } }

/* ---- homepage: sections -------------------------------------------- */
.section { max-width: var(--max); margin: 0 auto; padding: 88px 24px 0; }
.section-head { max-width: 640px; margin: 0 0 36px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--hh-sand-ink);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--sand); }
.section-head h2, .use-cases h2 {
  font-size: clamp(26px, 3vw, 36px); line-height: 1.5; margin: 0 0 10px;
  font-weight: 700; color: var(--navy);
}
.section-head p { margin: 0; font-size: 16px; color: var(--ink-3); text-wrap: pretty; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 26px 26px;
  box-shadow: var(--shadow-card);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature:hover { transform: translateY(-2px); border-color: var(--line-2);
  box-shadow: 0 1px 2px rgba(13,27,62,.05), 0 20px 40px -20px rgba(13,27,62,.3); }
.feature .ic {
  width: 46px; height: 46px;
  background: var(--navy);
  border-radius: 13px;
  display: grid; place-items: center;
  color: var(--cream);
  margin-bottom: 18px;
}
.feature h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--navy); line-height: 1.6; }
.feature p  { margin: 0; color: var(--ink-3); font-size: 14.5px; line-height: 1.9; }
.feature p b { color: var(--navy); font-weight: 700; white-space: nowrap; }
.feature p s { color: var(--muted); font-weight: 500; }

/* "One message, thousands of customers" — the flock, one bird lit */
.flock {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: 96px; background: var(--navy); color: var(--on-navy);
}
.flock::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url(/brand/pattern-flock.svg) center / cover no-repeat;
}
.flock::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 90% at 50% 50%, rgba(13,27,62,.92) 25%, rgba(13,27,62,.35) 80%);
}
.flock-in { max-width: var(--max); margin: 0 auto; padding: 92px 24px; text-align: center; }
.flock h2 { margin: 0 0 8px; font-size: clamp(30px, 4vw, 48px); line-height: 1.45; font-weight: 700; }
.flock p { margin: 0; color: var(--sand); font-size: 16px; }

.use-cases h2 { margin-bottom: 0; }
.use-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.use {
  position: relative;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px 20px 18px;
  font-size: 14px; color: var(--ink-3); line-height: 1.85;
}
.use b { display: block; color: var(--navy); margin-bottom: 6px; font-size: 15px; font-weight: 700; }
.use b::before {
  content: ""; display: block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--sand); margin-bottom: 14px;
}

/* closing call to action */
.cta-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; gap: 28px;
  background: var(--navy); color: var(--on-navy);
  border-radius: 26px; padding: 40px 44px;
}
.cta-card::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset-block: -60% -60%; inset-inline-start: 35%; width: 80%;
  background: url(/brand/pattern-flight-lines.svg) center / cover no-repeat;
  opacity: .35;
}
.cta-card > img { flex: none; width: 96px; height: auto; }
.cta-copy { flex: 1; min-width: 0; }
.cta-copy h2 { margin: 0 0 6px; font-size: 30px; line-height: 1.5; font-weight: 700; }
.cta-copy p { margin: 0; color: var(--on-navy-2); font-size: 15.5px; }
.cta-actions { display: flex; gap: 12px; flex: none; }

/* ---- legal / content pages --------------------------------------- */
.content {
  max-width: 840px;
  margin: 0 auto;
  padding: 56px 24px 24px;
}
.content h1 {
  font-size: 36px; margin: 0 0 8px;
  font-weight: 700; line-height: 1.5; color: var(--navy);
}
/* the crest: one short red stroke above the page title */
.content h1::before {
  content: ""; display: block; width: 36px; height: 4px; border-radius: 4px;
  background: var(--crest); margin-bottom: 20px;
}
.content .meta {
  color: var(--muted); font-size: 14px; margin-bottom: 40px;
  padding-bottom: 24px; border-bottom: 1px solid var(--line);
}
.content h2 {
  font-size: 21px; font-weight: 700; color: var(--navy);
  margin: 44px 0 12px; line-height: 1.6;
}
.content h3 {
  font-size: 16.5px; font-weight: 700; color: var(--navy);
  margin: 28px 0 8px;
}
.content p, .content li {
  font-size: 15.5px; color: var(--ink-2); line-height: 1.95;
}
.content ul { padding-inline-start: 22px; }
.content li { margin-bottom: 6px; }
.content li::marker { color: var(--sand); }
.content a { text-decoration: underline; text-decoration-color: rgba(27,45,92,.3); text-underline-offset: 4px; }
.content a:hover { text-decoration-color: currentColor; }
.content code {
  background: var(--blue-soft); color: var(--blue);
  padding: 2px 6px; border-radius: 5px;
  font-size: 13px;
}
.content .box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 22px 0;
  box-shadow: inset -3px 0 0 var(--navy);   /* the start edge: these pages are rtl */
}
.content .box.warn {
  background: #FFF8E8;
  border-color: #EBD6A8;
  box-shadow: inset -3px 0 0 #B7791F;
}

/* ---- contact page ------------------------------------------------- */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin-top: 30px;
}
.contact-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 24px;
  box-shadow: var(--shadow-card);
}
.contact-card h3 { margin: 0 0 12px; font-size: 16.5px; color: var(--navy); }
.contact-card p  { margin: 6px 0; font-size: 14.5px; color: var(--ink-2); }

/* ---- responsive --------------------------------------------------- */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; padding: 48px 24px 0; gap: 8px; }
  .hero-art { min-height: 0; max-width: 640px; width: 100%; margin: 12px auto 0; }
  .hero-bird { position: relative; inset: auto; display: block; width: 100%; transform: none; }
  .bubble.b1 { inset-inline-start: 0; top: 2%; }
  .bubble.b2 { inset-inline-start: auto; inset-inline-end: 0; bottom: 4%; }
  .features { grid-template-columns: 1fr 1fr; }
  .use-grid { grid-template-columns: 1fr 1fr; }
  .cta-card { flex-wrap: wrap; padding: 34px 28px; }
  .cta-actions { width: 100%; }
}
@media (max-width: 800px) {
  .nav { flex-wrap: wrap; gap: 10px 16px; }
  /* the page links become one row you can swipe, under the logo */
  .nav-links {
    order: 3; width: 100%; margin: 0 -24px; padding: 2px 24px 4px;
    width: calc(100% + 48px);
    overflow-x: auto; scrollbar-width: none; white-space: nowrap; gap: 22px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 36px);
            mask-image: linear-gradient(to right, transparent 0, #000 36px);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-cta { margin-inline-start: auto; }
  .features, .use-grid, .foot-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .section { padding-top: 64px; }
  .bubble { display: none; }
  .flock { margin-top: 72px; }
  .flock-in { padding: 64px 24px; }
}

/* ---- phone refinements -------------------------------------------- */
@media (max-width: 480px) {
  .nav { padding: 12px 16px; }
  .nav-links { margin: 0 -16px; padding: 2px 16px 4px; width: calc(100% + 32px); gap: 20px; }
  .brand img { height: 30px; }
  .nav-cta { padding: 7px 16px; font-size: 13.5px; }
  .hero-in { padding: 36px 18px 0; }
  .hero h1 { font-size: 31px; line-height: 1.5; }
  .hero-lead { font-size: 15.5px; line-height: 1.95; }
  /* stack CTAs full-width so long labels never overflow */
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn-primary, .hero-ctas .btn-ghost { width: 100%; }
  .hero-en { font-size: 12.5px; }
  .section { padding: 56px 18px 0; }
  .feature { padding: 24px 20px 22px; }
  .cta-card { padding: 30px 22px; gap: 20px; border-radius: 22px; }
  .cta-card > img { width: 76px; }
  .cta-copy h2 { font-size: 26px; }
  .cta-actions { flex-direction: column; }
  .cta-actions a { width: 100%; }
  /* legal / content pages: lighter gutters + type */
  .content { padding: 36px 18px 8px; }
  .content h1 { font-size: 28px; }
  .content h2 { font-size: 19px; }
  .site-footer { padding: 44px 18px 24px; margin-top: 64px; }
  .foot-bottom { justify-content: flex-start; }
}

/* ---- Arabic / RTL ------------------------------------------------- */
/* Code, URLs, e-mails and IDs stay left-to-right inside Arabic text.
   <code> takes its direction from its own content, so an Arabic phrase in
   <code> still reads right-to-left. */
pre, kbd, samp, .ltr { direction: ltr; unicode-bidi: isolate; }
code { unicode-bidi: plaintext; }
