/* ============================================================
   Ahmed Saleh Albalooshi — AI advisory site
   fintechbh.com  |  v1 — home page
   ============================================================ */

:root {
  --ink:        #14171c;
  --ink-soft:   #2b313a;
  --muted:      #5c6675;
  --line:       #e3e6ea;
  --paper:      #ffffff;
  --wash:       #f6f7f9;
  --brand:       #d81e2c;  /* on light backgrounds  — 5.1:1 on white  */
  --brand-light: #ff5f6d;  /* on dark backgrounds   — 6.1:1 on --ink  */
  --brand-dark:  #a8121e;
  --maxw:       1140px;
  --pad:        clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 88px;
}

.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; margin-right: auto; }

.brand-icon { width: auto; height: 92px; flex: none; }

.brand-name { font-weight: 700; letter-spacing: -.02em; font-size: 1.75rem; line-height: 1.15; color: var(--brand-dark); }
.brand-name span {
  display: block;
  font-weight: 600;
  font-size: .82rem;
  color: var(--ink);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-top: .25rem;
}

.nav { display: flex; gap: .3rem; }
.nav a {
  text-decoration: none;
  font-size: .95rem;
  color: var(--ink-soft);
  font-weight: 500;
  padding: .55rem 1rem;
  border-radius: 6px;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: var(--wash); color: var(--ink); }

.btn {
  display: inline-block;
  padding: .78rem 1.5rem;
  border-radius: 3px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  border: 1.5px solid transparent;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { border-color: rgba(255,255,255,.42); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */

.hero {
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
}

.hero-copy { padding-bottom: clamp(3.5rem, 7vw, 5.5rem); }

.eyebrow {
  display: block;
  margin: 0 0 1.6rem;
  font-weight: 700;
}
.eyebrow::before {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background: var(--brand-light);
  margin-bottom: .85rem;
}

/* line 1 — the light red, because #D81E2C only reaches 3.5:1 on Ink.
   #FF5F6D gives 6.1:1, so this line is safe at any size.            */
.eb-lead {
  display: block;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--brand-light);
  letter-spacing: .01em;
}

/* the name, in small caps */
.eb-name {
  font-variant-caps: all-small-caps;
  font-feature-settings: "c2sc", "smcp";
  letter-spacing: .07em;
}

/* line 2 — off-white, deliberately smaller than eb-lead above */
.eb-loc {
  display: block;
  margin-top: .3rem;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--wash);
  letter-spacing: .04em;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  line-height: 1.06;
  letter-spacing: -.032em;
  font-weight: 700;
  margin: 0 0 1.3rem;
}

.hero .sub {
  font-size: clamp(1.05rem, 1.9vw, 1.28rem);
  line-height: 1.55;
  color: #c3cad4;
  max-width: 34em;
  margin: 0 0 2.3rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero-photo { position: relative; align-self: end; }
.hero-photo img {
  width: 100%;
  filter: grayscale(.12) contrast(1.04);
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 26%;
  background: linear-gradient(to top, var(--ink), transparent);
  pointer-events: none;
}

/* ---------- Proof strip ---------- */

.proof {
  background: var(--wash);
  border-bottom: 1px solid var(--line);
}
.proof .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding-block: 2.6rem;
}
.proof-item { text-align: center; }
.proof-num {
  display: block;
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--ink);
}
.proof-label {
  display: block;
  margin-top: .55rem;
  font-size: .87rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- Generic section ---------- */

section { padding-block: clamp(3.5rem, 7vw, 6rem); }

.section-head { max-width: 44em; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  letter-spacing: -.028em;
  line-height: 1.15;
  margin: 0 0 .9rem;
  font-weight: 700;
}
.section-head p { color: var(--muted); font-size: 1.06rem; margin: 0; }
.text-link { display: inline-block; margin-top: .9rem; color: var(--brand); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* `p.kicker` (not `.kicker`) so it outranks `.section-head p` */
p.kicker {
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 .9rem;
}

/* ---------- Services ---------- */

.group-label {
  margin: 2.6rem 0 .9rem;
  display: flex;
  align-items: center;
  gap: .9rem;
}
.group-label span {
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  padding: .45rem 1rem;
  border-radius: 999px;
}
.group-label::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--muted);
}
.group-label:first-of-type { margin-top: 0; }

.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.services-single { grid-template-columns: 1fr; }
.services-single .service ul { columns: 2; column-gap: 2.5rem; }

.service {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  transition: background .2s ease;
}
.service:hover { background: var(--wash); }
.service .num {
  display: block;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .04em;
}
.service h3 {
  font-size: 1.3rem;
  letter-spacing: -.02em;
  margin: .8rem 0 .7rem;
  font-weight: 700;
}
.service p { margin: 0; color: var(--muted); font-size: .98rem; }
.service ul { margin: 1rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .93rem; }
.service li { margin-bottom: .3rem; }

/* ---------- Scope (the name is not the limit) ---------- */

.scope { background: var(--wash); border-bottom: 1px solid var(--line); }
.scope .wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.scope h2 {
  font-size: clamp(1.7rem, 3.1vw, 2.3rem);
  letter-spacing: -.028em;
  line-height: 1.15;
  margin: 0;
  font-weight: 700;
}
.scope p { color: var(--ink-soft); margin: 0 0 1.1rem; }
.scope p:last-child { margin-bottom: 0; }

/* ---------- Capacity ---------- */

.capacity { background: var(--ink); color: #fff; }
/* only the first .wrap is the two-column story block; the second holds continuity */
.capacity > .wrap:first-of-type { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.capacity p.kicker { color: var(--brand-light); }
.capacity h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 0;
  font-weight: 700;
}
.capacity p { color: #c3cad4; margin: 0 0 1.1rem; }
.capacity .capacity-out {
  color: #fff;
  font-weight: 600;
  border-left: 3px solid var(--brand-light);
  padding-left: 1.2rem;
  margin: 1.8rem 0 0;
}

.continuity {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid rgba(255,255,255,.16);
}
.continuity h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -.01em;
  margin: 0 0 2rem;
}
.continuity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.continuity-item h4 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--brand-light);
  margin: 0 0 .7rem;
  letter-spacing: -.01em;
}
.continuity-item p { color: #c3cad4; margin: 0; font-size: .96rem; }
.skill-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.skill-list li {
  color: #e4e8ee;
  font-size: .93rem;
  padding: .4rem 0 .4rem 1.3rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  position: relative;
}
.skill-list li:last-child { border-bottom: 0; }
.skill-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .95em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-light);
}

/* ---------- Engagements ---------- */

.engagements { background: var(--wash); }

.eng-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.eng-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
}
.eng-year { font-size: 1.05rem; font-weight: 700; color: var(--brand); letter-spacing: .05em; }
.eng-card h3 { font-size: 1.12rem; line-height: 1.35; margin: .7rem 0 .6rem; letter-spacing: -.015em; }
.eng-card p { margin: 0; font-size: .93rem; color: var(--muted); }
.eng-role {
  margin-top: auto;
  padding-top: 1.1rem;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-soft);
  font-weight: 600;
}

.eng-more { margin-top: 2.2rem; }

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

.authority .wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.authority img { border: 1px solid var(--line); }
.authority h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); letter-spacing: -.028em; margin: 0 0 1.2rem; line-height: 1.15; }
.authority p { color: var(--ink-soft); margin: 0 0 1.1rem; }

.credentials { list-style: none; margin: 1.8rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.credentials li {
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .96rem;
  display: flex;
  gap: .9rem;
  align-items: baseline;
}
.credentials li::before { content: "—"; color: var(--brand); font-weight: 700; }

/* ---------- Books ---------- */

.books { background: var(--ink); color: #fff; }
.books .section-head h2 { color: #fff; }
.books .section-head p { color: #aab3c0; }
.books p.kicker { color: var(--brand-light); }
.books-note { color: #c3cad4; max-width: 40em; }

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

.contact .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.contact h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -.028em; margin: 0 0 1rem; line-height: 1.15; }
.contact p { color: var(--muted); margin: 0 0 1.8rem; }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contact-list a { text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--brand); }
.contact-text { display: block; }
.contact-label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin-bottom: .25rem; }

/* ---------- Icon system ----------
   One consistent line-icon set: 24x24, stroke=currentColor, no fill.
   Services + contact icons sit in a quiet --wash circle on light
   backgrounds; continuity icons sit in a translucent circle on the
   dark --ink section and pick up --brand-light, matching that
   section's existing kicker/heading colour. Red stays reserved for
   the numerals and CTAs — icons support content, they don't compete
   with the accent hierarchy already on the page.                   */

.service-icon,
.contact-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--wash);
  color: var(--ink);
  flex: none;
}
.service-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .3rem;
}
.contact-icon { margin-top: .1rem; }

.continuity-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--brand-light);
  margin-bottom: 1rem;
}

.service-icon svg,
.contact-icon svg,
.continuity-icon svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.socials { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.socials a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.socials svg { width: 20px; height: 20px; fill: currentColor; display: block; }

/* Platform brand colours */
.socials .s-linkedin  { color: #0a66c2; }
.socials .s-youtube   { color: #ff0000; }
.socials .s-x         { color: #000000; }

.socials a:hover,
.socials a:focus-visible {
  background: currentColor;
  border-color: currentColor;
  transform: translateY(-2px);
}
.socials a:hover svg,
.socials a:focus-visible svg { fill: #fff; }

/* Instagram carries a gradient, so it is handled separately */
.socials .s-instagram svg path { fill: url(#ig-gradient); }
.socials .s-instagram:hover,
.socials .s-instagram:focus-visible {
  background: linear-gradient(45deg, #ffdd55, #ff543e 30%, #c837ab 60%, #3f5bd9);
  border-color: transparent;
}
.socials .s-instagram:hover svg path,
.socials .s-instagram:focus-visible svg path { fill: #fff; }

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

.site-footer {
  background: var(--wash);
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
  font-size: .88rem;
  color: var(--muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; justify-content: space-between; align-items: center; }
.site-footer strong { color: var(--ink); font-weight: 600; }
.footer-legal { display: flex; align-items: center; gap: 1rem; }
.footer-legal img { width: 110px; height: auto; flex: none; }

/* ---------- Kicker overrides ----------
   Section rules like `.authority p` and `.contact p` share specificity with
   `p.kicker` and appear later, so the label colour must be restated here.
   Keep this block LAST before the media queries.                        */

.authority p.kicker,
.contact   p.kicker,
.scope     p.kicker { color: var(--brand); margin: 0 0 .9rem; }

/* ---------- Article cards ---------- */

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--wash);
  border-radius: 0.5rem;
  border-top: 3px solid var(--brand);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.article-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-date {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-card h3 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: 600;
}

.article-link {
  color: var(--ink);
  text-decoration: none;
}

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

.article-summary {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 1rem;
  flex: 1;
  line-height: 1.6;
}

.article-read {
  display: inline-block;
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: auto;
}

.article-read:hover {
  text-decoration: underline;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 2.5rem; }
  .hero-photo { max-width: 380px; margin-inline: auto; }
  .proof .wrap { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .services { grid-template-columns: 1fr; }
  .services-single .service ul { columns: 1; }
  .eng-grid { grid-template-columns: 1fr; }
  .authority .wrap { grid-template-columns: 1fr; }
  .capacity > .wrap:first-of-type { grid-template-columns: 1fr; }
  .scope .wrap { grid-template-columns: 1fr; }
  .continuity-grid { grid-template-columns: 1fr; }
  .authority .authority-photo { max-width: 320px; }
  .contact .wrap { grid-template-columns: 1fr; }
  .nav { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .brand-name { font-size: 1.3rem; }
  .brand-icon { width: auto; height: 58px; }
  .eyebrow::before { width: 60px; margin-bottom: .7rem; }
  .eb-lead { font-size: 1.2rem; }
  .eb-loc { font-size: .9rem; }
  .eb-name { letter-spacing: .03em; }
  .site-header .brand-name span { display: none; }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: .8rem; }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
}
