/* ==========================================================================
   MahrRaheem.com — Hero, About Me, Services
   Plain CSS, no JavaScript. Edit the variables below to adjust the design.
   ========================================================================== */

:root {
  /* Colors */
  --c-hero: #EDF4FD;
  --c-white: #FFFFFF;
  --c-soft: #F6F9FE;
  --c-heading: #063B2D;
  --c-primary: #075BE8;
  --c-primary-dark: #0549BC;
  --c-text: #17212B;
  --c-muted: #64748B;
  --c-border: #E5E7EB;
  --c-icon-bg: #EAF2FF;
  --c-green: #1FA463;
  --c-yellow: #FBBC04;
  --c-red: #EA4335;

  /* Fonts */
  --font-heading: Georgia, "Times New Roman", serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --space-section: clamp(3.5rem, 7vw, 5.5rem);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
svg { display: block; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.ic {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 3px solid var(--c-primary);
  outline-offset: 3px;
}

/* ---------- Shared text styles ---------- */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 0.5rem;
}

h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.65rem, 1.2rem + 1.4vw, 2.2rem);
  line-height: 1.2;
  color: var(--c-heading);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0 1.4rem;
  background: var(--c-primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color 200ms ease;
}
.btn:hover { background: var(--c-primary-dark); }

/* ==========================================================================
   1. HERO
   ========================================================================== */
.hero {
  background: var(--c-hero);
  padding-block: var(--space-section);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.hero h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 1.2rem + 2.6vw, 2.75rem);
  line-height: 1.2;
  color: var(--c-heading);
  text-wrap: balance;
}

.hero__lead {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* ---------- Hero illustration ----------
   Everything inside is sized with --u (1% of the illustration width),
   so the whole composition scales together. */
.hero-art {
  --u: 1cqw;
  --fs-xs: max(9px, calc(var(--u) * 1.7));
  --fs-s: max(10px, calc(var(--u) * 1.95));
  --fs-m: max(12px, calc(var(--u) * 2.7));
  --fs-num: max(20px, calc(var(--u) * 4.2));

  position: relative;
  container-type: inline-size;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  aspect-ratio: 100 / 94;
}

.hero-art > * { position: absolute; }

.blob { inset: 0; width: 100%; height: 100%; }

.pin { height: auto; }
.pin--orange { left: 25%; top: 3%; width: calc(var(--u) * 3); color: #F59E0B; fill: currentColor; }
.pin--blue { left: 37%; top: 6%; width: calc(var(--u) * 3.6); color: var(--c-primary); fill: currentColor; }
.pin--orange-sm { left: 26%; top: 69%; width: calc(var(--u) * 2.6); color: #F59E0B; fill: currentColor; }
.pin--blue-sm { left: 66%; top: 66%; width: calc(var(--u) * 2.4); color: var(--c-primary); fill: currentColor; }

/* Panels (white cards inside the illustration) */
.panel {
  background: var(--c-white);
  border-radius: calc(var(--u) * 1.6);
  padding: calc(var(--u) * 2.2);
  font-size: var(--fs-s);
  line-height: 1.25;
  color: var(--c-text);
  transition: transform 250ms ease;
}

@media (hover: hover) {
  .panel:hover { transform: translateY(-4px); }
  .panel--rev:hover { transform: translateY(-5px); }
  .panel--traffic:hover { transform: translateY(-3px); }
  .panel--kw:hover { transform: translateY(-4px); }
  .panel--calls:hover { transform: translateY(-3px); }
  .panel--rank:hover { transform: translateY(-3px); }
  .panel--main:hover { transform: none; }
}

.panel--rank { left: 0; top: 9%; width: 23%; }
.panel--main { left: 24%; top: 12%; width: 46%; padding: calc(var(--u) * 2.4); border-radius: calc(var(--u) * 1.8); }
.panel--rev { left: 72%; top: 2%; width: 28%; }
.panel--traffic { left: 72%; top: 32%; width: 28%; }
.panel--calls { left: 2%; top: 55%; width: 21%; }
.panel--kw { left: 30%; top: 76%; width: 41%; }

.p-label { font-size: var(--fs-s); font-weight: 500; color: var(--c-text); }
.p-sub { font-size: var(--fs-xs); color: var(--c-muted); }
.p-num { font-size: var(--fs-num); font-weight: 600; line-height: 1.1; margin-block: calc(var(--u) * 0.5); }
.p-num--blue { color: var(--c-primary); }
.p-head { display: flex; align-items: center; gap: calc(var(--u) * 1.2); }

.p-ic {
  display: grid;
  place-items: center;
  flex: none;
  width: calc(var(--u) * 3.4);
  height: calc(var(--u) * 3.4);
  border-radius: calc(var(--u) * 0.9);
  background: var(--c-icon-bg);
  color: var(--c-primary);
}
.p-ic .ic { width: 60%; height: 60%; }
.p-ic--green { background: #E3F5EC; color: var(--c-green); margin-bottom: calc(var(--u) * 0.6); }

.stars { display: inline-flex; gap: 0.08em; }
.stars svg { width: 1.15em; height: 1.15em; fill: var(--c-yellow); }

.big-star { width: calc(var(--u) * 3.6); height: calc(var(--u) * 3.6); fill: var(--c-yellow); flex: none; }

.chart { width: 100%; height: auto; margin-top: calc(var(--u) * 1); }

/* Local Rankings grid */
.rank-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: calc(var(--u) * 0.5);
  margin-block: calc(var(--u) * 1.3);
}
.rank-grid svg { width: 100%; height: auto; }
.s-g { fill: var(--c-green); }
.s-y { fill: var(--c-yellow); }
.s-l { fill: #A8DDBF; }

/* Keywords panel */
.panel--kw {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22%;
  align-items: end;
  gap: calc(var(--u) * 1.5);
}
.panel--kw .p-num { margin-block: calc(var(--u) * 0.3); }
.bars { width: 100%; height: auto; }

/* Central listing */
.gbp__head { display: flex; justify-content: space-between; align-items: flex-start; gap: calc(var(--u) * 1.5); }
.gbp__name {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 0.8);
  font-size: var(--fs-m);
  font-weight: 600;
  line-height: 1.2;
}
.verified { width: calc(var(--u) * 2.2); height: calc(var(--u) * 2.2); flex: none; }
.gbp__rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(var(--u) * 0.7);
  margin-top: calc(var(--u) * 0.6);
  font-size: var(--fs-s);
}
.gbp__rating .stars svg { width: 1.05em; height: 1.05em; }
.muted { color: var(--c-muted); }
.gbp__status { margin-top: calc(var(--u) * 0.4); font-size: var(--fs-s); color: var(--c-muted); }
.open { color: var(--c-green); font-weight: 500; }

.rank-badge {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--u) * 1) calc(var(--u) * 1.4);
  background: var(--c-green);
  color: #fff;
  border-radius: calc(var(--u) * 1);
  line-height: 1.1;
}
.rank-badge strong { font-size: calc(var(--u) * 3.6); font-weight: 700; }
.rank-badge span { font-size: var(--fs-xs); white-space: nowrap; }

.map {
  width: 100%;
  aspect-ratio: 230 / 100;
  height: auto;
  margin-top: calc(var(--u) * 1.6);
  border-radius: calc(var(--u) * 1);
}

.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(var(--u) * 0.5);
  margin-top: calc(var(--u) * 1.4);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--c-muted);
}
.actions li { display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 0.5); }
.act-ic {
  display: grid;
  place-items: center;
  width: calc(var(--u) * 4);
  height: calc(var(--u) * 4);
  border-radius: 50%;
  background: var(--c-icon-bg);
  color: var(--c-primary);
}
.act-ic .ic { width: 50%; height: 50%; }

.gbp__review {
  margin-top: calc(var(--u) * 1.4);
  font-size: var(--fs-xs);
  color: var(--c-muted);
}
.gbp__review .stars { display: flex; margin-top: calc(var(--u) * 0.5); font-size: var(--fs-xs); }

/* ==========================================================================
   2. ABOUT ME
   ========================================================================== */
.about {
  background: var(--c-white);
  padding-block: var(--space-section);
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.about__photo { position: relative; }

.portrait {
  position: relative;
  aspect-ratio: 1 / 1.02;
  background: #F3F7FD;
  border-radius: var(--radius-lg);
}
.portrait::before {
  content: "";
  position: absolute;
  right: -10%;
  top: 22%;
  width: 62%;
  height: 56%;
  border-radius: 50%;
  background: #DCEAFF;
}
.portrait img,
.portrait__placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.portrait__badge {
  position: absolute;
  left: -1rem;
  bottom: 6%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem 0.55rem 0.6rem;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
}
.portrait__badge-ic {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--c-green);
  color: #fff;
}
.portrait__badge-ic .ic { width: 1.1rem; height: 1.1rem; }

.about__copy h2 { margin-bottom: 1rem; }
.about__copy p:not(.eyebrow) { max-width: 38rem; }

.stats { display: flex; margin-top: 2rem; }
.stats li {
  display: flex;
  flex-direction: column;
  padding-inline: clamp(1rem, 2.5vw, 2rem);
  border-left: 1px solid var(--c-border);
}
.stats li:first-child { padding-left: 0; border-left: 0; }
.stats strong {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--c-heading);
}
.stats span { font-size: 0.85rem; color: var(--c-muted); }

.features { display: grid; gap: 1.75rem; }
.feature { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start; }
.feature h3 { font-size: 0.95rem; font-weight: 600; line-height: 1.3; }
.feature p { margin-top: 0.15rem; font-size: 0.875rem; line-height: 1.5; color: var(--c-muted); }

/* Icon squares (About + Services) */
.ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
}
.ico .ic { width: 1.25rem; height: 1.25rem; }
.ico--blue { background: var(--c-icon-bg); color: var(--c-primary); }
.ico--green { background: #E3F5EC; color: var(--c-green); }
.ico--violet { background: #E8E8FB; color: #5B5BD6; }
.ico--lg { width: 3.25rem; height: 3.25rem; }
.ico--lg .ic { width: 1.5rem; height: 1.5rem; }
.ico--lg.ico--blue { background: #DCE9FF; }
.ico--lg.ico--green { background: #D9F2E6; }
.ico--lg.ico--violet { background: #E3E3FA; }

/* ==========================================================================
   3. SERVICES
   ========================================================================== */
.services {
  background: var(--c-soft);
  padding-block: var(--space-section);
}

.services__lead {
  margin-top: 0.75rem;
  max-width: 36rem;
  color: var(--c-muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.75rem;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
}

.card h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.3; color: var(--c-text); }
.card p { margin-top: 0.5rem; font-size: 0.9rem; line-height: 1.6; color: var(--c-muted); }

.card__link {
  display: inline-flex;
  margin-top: 1.1rem;
  color: var(--c-muted);
  transition: color 200ms ease;
}
.card__link:hover { color: var(--c-primary); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Laptops / small desktops: stack hero, keep the illustration large enough to read */
@media (max-width: 1179px) {
  .hero__grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero__lead { max-width: 40rem; }
  .hero-art { max-width: 620px; margin-inline: 0; }
}

/* Tablets */
@media (max-width: 1023px) {
  .about__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); align-items: start; }
  .features {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--c-border);
  }
}

@media (max-width: 859px) {
  .cards { grid-template-columns: 1fr; }
}

/* Phones: illustration turns into a tidy stack of panels */
@media (max-width: 699px) {
  .hero__actions .btn { flex: 1 1 100%; }

  .hero-art {
    --u: 6.2px;
    container-type: normal;
    max-width: none;
    margin-inline: 0;
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .hero-art > * { position: static; }
  .hero-art .blob,
  .hero-art .pin { display: none; }
  .hero-art .panel { width: auto; padding: 1rem; border-radius: 12px; }
  .hero-art .panel--main { grid-column: 1 / -1; padding: 1.1rem; }
  .hero-art .panel--kw { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) 28%; }
  .hero-art .panel--rev { order: 2; }

  .about__grid { grid-template-columns: 1fr; }
  .about__photo { max-width: 22rem; margin-left: 1rem; }
  .portrait__badge { left: -0.5rem; }
  .features { grid-template-columns: 1fr; }
  .stats li { padding-inline: 1rem; }
  .card { padding: 1.4rem; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .panel,
  .btn,
  .card__link { transition: none; }
  .panel:hover { transform: none !important; }
}
