/* rabeh.qa — presentation layer.
 *
 * Layout conventions follow the Astra "Financial Advisor" starter template
 * (Astra is GPL-licensed on wordpress.org). What is borrowed is the layout
 * language of a corporate finance site, not any of its code or assets:
 * full-bleed alternating bands, a card overlapping the hero's lower edge,
 * centred section intros, uppercase letterspaced buttons at a 2px radius,
 * flat hairline-bordered cards, arc-masked artwork, and a closing CTA band.
 *
 * The palette is deliberately light and warm rather than dark. Colour carries
 * the energy: a set of accent hues drawn from Rabeh's own brand material tints
 * the section bands and the card icons, and a single saturated red band near
 * the foot gives the page one strong focal point instead of several heavy
 * dark ones.
 */

/* ── palette ── */
:root {
  /* Brighter, warmer base than the stock greys. */
  --bg: #fdfbf7;
  --bg-raised: #ffffff;
  --bg-sunken: #f7f2ea;

  /* Band tints — each section gets its own warmth so the page has rhythm. */
  --tint-blush: #fdf3ef;
  --tint-gold: #fdf6e8;
  --tint-sand: #f8f3ea;

  /* Accent hues, taken from Rabeh's existing brand material. Used on icons and
     stat figures so the page reads as lively rather than monochrome red. */
  --a-red: #c0392b;
  --a-gold: #b8862b;
  --a-teal: #12857a;
  --a-green: #2d7d4a;
  --a-blue: #2a6b9c;
  --a-plum: #8e3d6b;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tint-blush: #221a17;
    --tint-gold: #221d14;
    --tint-sand: #1b1815;
    --a-teal: #4cc3b4;
    --a-green: #6cc38b;
    --a-blue: #6aa8d8;
    --a-plum: #cf87b0;
  }
}
:root[data-theme="dark"] {
  --tint-blush: #221a17;
  --tint-gold: #221d14;
  --tint-sand: #1b1815;
  --a-teal: #4cc3b4;
  --a-green: #6cc38b;
  --a-blue: #6aa8d8;
  --a-plum: #cf87b0;
}

/* ── section rhythm ── */
section.band.alt {
  background: var(--tint-blush);
}
section.band.gold {
  background: var(--tint-gold);
}
section.band.sand {
  background: var(--tint-sand);
}

/* Centred section intro: eyebrow, short rule, display heading. */
.intro {
  text-align: center;
  max-width: 62ch;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 4vw, 3.2rem);
}
.intro .eyebrow::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  background: var(--a-gold);
  margin: 0.7rem auto 1.1rem;
}
.intro h2 {
  font-size: clamp(1.8rem, 4.2vw, 2.9rem);
  line-height: 1.22;
}
.intro p {
  margin-top: 1rem;
  color: var(--ink-2);
}

/* ── buttons: uppercase, letterspaced, near-square ── */
.btn {
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 1rem 1.9rem;
}
.btn-primary {
  box-shadow: 0 6px 18px rgba(192, 57, 43, 0.22);
}
.btn-primary:hover {
  box-shadow: 0 8px 22px rgba(192, 57, 43, 0.3);
}
.btn-on-red {
  background: #fff;
  color: var(--a-red);
  border-color: #fff;
}
.btn-on-red:hover {
  background: transparent;
  color: #fff;
}
.ico-inline {
  width: 15px;
  height: 15px;
}

/* ── hero: light, warm and open ── */
.hero {
  position: relative;
  background: linear-gradient(168deg, var(--tint-gold) 0%, var(--tint-blush) 48%, var(--bg) 100%);
  padding-block: clamp(3.4rem, 8vw, 6rem) clamp(6rem, 11vw, 9rem);
  overflow: hidden;
  isolation: isolate;
}
/* Soft colour blooms give depth without darkening anything. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(52% 58% at 84% 22%, rgba(192, 57, 43, 0.13), transparent 70%),
    radial-gradient(46% 52% at 8% 84%, rgba(18, 133, 122, 0.1), transparent 70%),
    radial-gradient(40% 46% at 50% 0%, rgba(184, 134, 43, 0.14), transparent 72%);
}
.hero .eyebrow {
  color: var(--a-red);
}
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 4.1rem);
  line-height: 1.1;
  max-width: 17ch;
}
.hero .lede {
  max-width: 54ch;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 3rem;
  align-items: center;
}
.hero-mark img {
  width: min(100%, 330px);
  filter: drop-shadow(0 16px 36px rgba(192, 57, 43, 0.18));
}
@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-mark {
    order: -1;
    justify-items: start;
  }
  .hero-mark img {
    width: 165px;
  }
}

/* Stat card lifted over the hero's lower edge, where the template puts a form. */
.statband {
  padding-block: 0;
  margin-top: clamp(-5rem, -7vw, -3.5rem);
  position: relative;
  z-index: 2;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.statband .grid {
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--a-red);
  box-shadow: 0 16px 44px rgba(90, 60, 40, 0.12);
  gap: 0;
}
.stat {
  border: 0;
  border-inline-end: 1px solid var(--rule);
  border-radius: 0;
  background: none;
  padding: clamp(1.3rem, 2.6vw, 1.9rem);
  text-align: center;
}
.stat:last-child {
  border-inline-end: 0;
}
@media (max-width: 860px) {
  .stat {
    border-inline-end: 0;
    border-bottom: 1px solid var(--rule);
  }
  .stat:last-child {
    border-bottom: 0;
  }
}
.stat .n {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
}
/* Cycle the accent hues across the stat row. */
.stat:nth-child(1) .n {
  color: var(--a-red);
}
.stat:nth-child(2) .n {
  color: var(--a-teal);
}
.stat:nth-child(3) .n {
  color: var(--a-blue);
}
.stat:nth-child(4) .n {
  color: var(--a-gold);
}

/* ── flat cards, with the accent cycling across each grid ── */
.card {
  border-radius: 3px;
  box-shadow: none;
  border-top: 2px solid var(--a-red);
  padding: clamp(1.5rem, 3vw, 2rem);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 10px 28px rgba(90, 60, 40, 0.1);
  transform: translateY(-2px);
}
.card h3 {
  font-size: 1.12rem;
}
.grid .card:nth-child(6n + 1) {
  border-top-color: var(--a-red);
}
.grid .card:nth-child(6n + 2) {
  border-top-color: var(--a-teal);
}
.grid .card:nth-child(6n + 3) {
  border-top-color: var(--a-gold);
}
.grid .card:nth-child(6n + 4) {
  border-top-color: var(--a-blue);
}
.grid .card:nth-child(6n + 5) {
  border-top-color: var(--a-green);
}
.grid .card:nth-child(6n + 6) {
  border-top-color: var(--a-plum);
}
.grid .card:nth-child(6n + 1) .ico {
  stroke: var(--a-red);
}
.grid .card:nth-child(6n + 2) .ico {
  stroke: var(--a-teal);
}
.grid .card:nth-child(6n + 3) .ico {
  stroke: var(--a-gold);
}
.grid .card:nth-child(6n + 4) .ico {
  stroke: var(--a-blue);
}
.grid .card:nth-child(6n + 5) .ico {
  stroke: var(--a-green);
}
.grid .card:nth-child(6n + 6) .ico {
  stroke: var(--a-plum);
}

/* ── checkmark feature row ── */
ul.checkrow {
  list-style: none;
  padding: 2.2rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.6rem 2.2rem;
  border-top: 1px solid var(--rule-strong);
  margin-top: 2.6rem;
}
ul.checkrow li {
  padding-inline-start: 2rem;
  position: relative;
  color: var(--ink-2);
  font-size: 0.93rem;
}
ul.checkrow li strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.15rem;
}
ul.checkrow li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 3px;
  width: 15px;
  height: 9px;
  border-inline-start: 2px solid var(--a-green);
  border-bottom: 2px solid var(--a-green);
  transform: rotate(-45deg);
}

/* ── arc-masked artwork ── */
.arc {
  border-radius: 160px 4px 4px 4px;
  overflow: hidden;
}
:root[dir="rtl"] .arc {
  border-radius: 4px 160px 4px 4px;
}

/* ── closing call to action: the page's one saturated band ── */
.cta-band {
  background: linear-gradient(135deg, #c0392b 0%, #a52f22 58%, #8d2a1f 100%);
  color: #fff;
  text-align: center;
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(60% 90% at 78% 10%, rgba(212, 160, 64, 0.3), transparent 62%);
}
.cta-band .eyebrow {
  color: rgba(255, 255, 255, 0.75);
}
.cta-band h2 {
  color: #fff;
  font-size: clamp(1.8rem, 4.4vw, 3rem);
  max-width: 22ch;
  margin-inline: auto;
}
.cta-band p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 58ch;
  margin-inline: auto;
  margin-top: 1.1rem;
}
.cta-band .btn-row {
  justify-content: center;
}

/* ── footer: light and warm, not a dark slab ── */
footer.site {
  background: var(--tint-sand);
  border-top: 1px solid var(--rule);
  margin-top: 0;
  padding-block: clamp(2.8rem, 6vw, 3.6rem) 1.6rem;
  color: var(--ink-2);
}
footer.site strong {
  color: var(--ink);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
}
footer.site .cols {
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
footer.site .legal {
  padding-top: 1.4rem;
  font-size: 0.78rem;
  color: var(--ink-3);
}

/* ── header: the Arabic mark alone, no English wordmark ── */
header.site {
  border-bottom: 1px solid var(--rule);
  background: var(--bg-raised);
}
header.site .bar {
  min-height: 74px;
}
.brand img {
  height: 44px;
  width: auto;
}
footer.site .brand img {
  height: 38px;
}
nav.main a,
nav.main button.navlink,
.locked {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
nav.main a[aria-current="page"] {
  color: var(--a-red);
  background: var(--tint-blush);
}
.langtoggle {
  border-radius: 2px;
}

/* ── carousel: match the flat, squared treatment ── */
.carousel-viewport {
  border-radius: 3px;
  box-shadow: none;
}
.slide-art {
  border-radius: 140px 3px 3px 3px;
  background: linear-gradient(145deg, var(--tint-gold), var(--tint-blush));
}
:root[dir="rtl"] .slide-art {
  border-radius: 3px 140px 3px 3px;
}
.cbtn {
  border-radius: 2px;
}
.panel {
  border-radius: 3px;
}

/* ── about: text beside an arc-masked brand plate ── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.8rem, 4vw, 3.4rem);
  align-items: center;
}
.about-art {
  background: linear-gradient(150deg, var(--tint-gold), var(--tint-blush));
  display: grid;
  place-items: center;
  padding: clamp(2rem, 5vw, 3.4rem);
  aspect-ratio: 1 / 1;
}
.about-art img {
  width: min(100%, 240px);
  height: auto;
}
@media (max-width: 800px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-art {
    aspect-ratio: 16 / 10;
  }
}
