/* ==========================================================================
   Apple-style theme for mhmdalori.com
   Loaded LAST on every public page, so it overrides styles.css and
   site-additions.css without touching them. To revert: remove the one
   <link rel="stylesheet" href="apple-theme.css"> line (HTML pages and
   includes/header.php).

   Principles: restraint (white, light gray, one blue), system font,
   size-specific tracking, translucent nav only, instant press feedback,
   reduced-motion / reduced-transparency / high-contrast fallbacks.
   ========================================================================== */

:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --soft: #f5f5f7;
  --paper: #ffffff;
  --blue: #0a6fa3;        /* brand blue, darkened so text and white-on-blue pass contrast */
  --blue-dark: #085a86;
  --navy: #1d1d1f;
  --max: 1120px;
  --site-header-height: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

html { scroll-padding-top: calc(var(--site-header-height) + 16px); }

body {
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea { font-family: inherit; }

/* ---------- Type: tight at large sizes, near zero at body ---------- */
h2 {
  margin: 0 0 18px;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 600;
}
h3 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 600;
}
.lead { color: var(--muted); font-size: 21px; line-height: 1.45; letter-spacing: -.005em; }
.eyebrow {
  color: var(--muted);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -.01em;
  text-transform: none;
  margin-bottom: 12px;
}
.muted { color: var(--muted); }

/* ---------- Header: the one translucent layer ---------- */
body > .site-header {
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
body > .site-header .nav { min-height: 64px; padding: 8px 0; }
body > .site-header .brand { flex: 0 0 150px; }
body > .site-header .brand-logo,
body > .site-header nav img { width: 150px; }
body > .site-header .nav-links { gap: 6px 28px; }
body > .site-header .nav-links > a:not(.btn) {
  font-size: 13px;
  letter-spacing: .01em;
  color: #424245;
  font-weight: 400;
  transition: color .15s;
}
body > .site-header .nav-links > a:not(.btn):hover { color: #000; }
body > .site-header .nav-links > [aria-current="page"]:not(.btn) {
  color: #000;
  font-weight: 500;
  border-bottom: 0;
}
body > .site-header .nav-links > .btn {
  min-height: 34px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 999px;
}
.nav-toggle { font-family: var(--font) !important; }

/* ---------- Buttons: pill, instant press ---------- */
.btn {
  min-height: 50px;
  padding: 0 30px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.01em;
  transition: transform .12s ease-out, filter .2s;
}
.btn:hover { background: var(--blue); filter: brightness(1.08); transform: none; }
.btn:active { transform: scale(.97); }
.btn.secondary { background: var(--soft); color: var(--ink); border: 0; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Home hero: centered, one idea, one action ---------- */
.hero { background: #fff; }
.hero-grid {
  grid-template-columns: 1fr;
  min-height: 0;
  gap: 0;
  padding: clamp(56px, 8vw, 104px) 0 0;
  text-align: center;
  justify-items: center;
}
.hero-grid > div:first-child { max-width: 980px; padding-bottom: 0; }
.hero h1 {
  max-width: 980px;
  margin: 0 auto;
  font-size: clamp(40px, 6.2vw, 80px);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 600;
}
.hero h1 .h1-soft { color: #86868b; }
.hero p {
  max-width: 700px;
  margin: 28px auto 36px;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.38;
  letter-spacing: -.005em;
  color: var(--muted);
}
.hero-art {
  width: 100%;
  max-width: var(--max);
  min-height: 0;
  height: 620px;
  margin-top: 72px;
  border-radius: 36px;
  overflow: hidden;
  background: radial-gradient(70% 80% at 50% 105%, #d9ebf5 0%, #eef4f8 48%, #f5f5f7 100%);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.hero-art img, .portrait-photo {
  width: auto;
  height: 600px;
  max-height: none;
  margin: 0;
  object-fit: contain;
  filter: none;
}

/* ---------- Page heroes (About, Pricing, Contact, Articles) ---------- */
.page-hero, .article-hero {
  background: var(--soft);
  color: var(--ink);
  padding: clamp(64px, 9vw, 110px) 24px;
  text-align: center;
}
.article-hero { padding-left: 0; padding-right: 0; }
.page-hero h1, .article-hero h1, .pricing-page .page-hero h1 {
  max-width: 900px;
  margin: 0 auto 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 600;
}
.page-hero p, .article-hero p, .pricing-page .page-hero p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(18px, 1.8vw, 21px);
  font-weight: 400;
  line-height: 1.45;
}
.article-hero .article-category { color: var(--blue); }
.article-hero .article-byline,
.article-breadcrumbs { color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-soft { background: var(--soft); }
.narrow { max-width: 880px; }

/* ---------- Clients ---------- */
.brand-carousel .client-logo { flex: 0 0 calc((100% - 42px) / 4); min-height: 80px; }
.brand-carousel .client-logo img { max-height: 64px; max-width: 170px; width: auto; }
.brand-carousel .client-logo.wide img { max-height: 32px; max-width: 190px; }
@media (max-width: 900px) { .brand-carousel .client-logo { flex-basis: calc((100% - 14px) / 2); } }
@media (max-width: 560px) { .brand-carousel .client-logo { flex-basis: 70%; } }
.logo-strip { border-bottom: 0; padding: 72px 0 24px; background: #fff; text-align: center; }
.brand-carousel-controls button,
.extra-services-controls button {
  border: 0;
  background: var(--soft);
  color: var(--ink);
  border-radius: 999px;
}

/* ---------- Cards: flat, soft, no outlines ---------- */
.card, .advisor-card, .price-card, .contact-details-card, .request-box, .video-card {
  border: 0;
  border-radius: 28px;
  background: var(--soft);
  box-shadow: none;
}
.card { padding: 36px; }
.tile-hover, .card, .price-card, .advisor-card { transition: transform .35s var(--ease); }
.card:hover, .advisor-card:hover { transform: scale(1.008); }
.advisor-context-card { background: var(--soft); border: 0; }

/* Why-work-with-me band */
.advisor-band {
  border: 0;
  border-radius: 32px;
  background: var(--soft);
  box-shadow: none;
}
.advisor-band-copy { padding: clamp(32px, 5vw, 56px); }
.advisor-band-copy h2, .advisor-card h2 { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -.028em; font-weight: 600; }
.advisor-card { padding: clamp(32px, 4.5vw, 52px); }
.advisor-grid { gap: 20px; }
.advisor-layout { gap: 20px; }
.tick-list li, .check-list li { color: var(--ink); font-size: 18px; line-height: 1.45; letter-spacing: -.01em; }
.tick-list li::before { border-color: var(--blue); }
.check-list li::before { background: var(--blue); }

/* Video */
.video-card { border-radius: 28px; box-shadow: none; }
.video-play { background: rgba(255, 255, 255, .92); box-shadow: none; }
.video-play::before { border-left-color: var(--ink); }

/* ---------- Services rail ---------- */
.extra-services {
  padding: clamp(72px, 9vw, 120px) 0 0;
  border-bottom: 0;
  background: #fff;
}
.extra-services h2 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; margin: 0; }
.extra-services-description { font-size: 21px; line-height: 1.4; color: var(--muted); max-width: 640px; margin: 16px 0 0; }
.extra-services .btn { font-size: 15px; min-height: 44px; background: var(--soft); color: var(--blue); }
.extra-services-carousel { margin-top: 44px; }
.extra-services-track { gap: 16px; padding: 4px 2px 20px; }
.extra-service-card {
  flex: 0 0 300px;
  min-height: 280px;
  padding: 32px;
  border: 0;
  border-radius: 28px;
  background: var(--soft);
  justify-content: flex-end;
  transition: transform .35s var(--ease);
}
.extra-service-card:hover { transform: scale(1.012); }
.extra-service-card:active { transform: scale(.985); transition-duration: .1s; }
.extra-service-icon { align-self: flex-start; margin-bottom: auto; background: #fff; color: var(--blue); }
.extra-service-card h3 { font-size: 24px; line-height: 1.15; letter-spacing: -.022em; margin: 24px 0 8px; }
.extra-service-card p { font-size: 17px; line-height: 1.4; color: var(--muted); }

/* ---------- Experience & achievements: the one dark moment ---------- */
.experience-achievements {
  padding: clamp(80px, 10vw, 140px) 0;
  background: #1d1d1f;
  border-bottom: 0;
}
.experience-achievements-eyebrow {
  color: #a1a1a6;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -.01em;
  text-transform: none;
}
.experience-achievements-intro { max-width: 820px; margin-bottom: 64px; }
.experience-achievements-intro h2 { color: #f5f5f7; font-size: clamp(34px, 5vw, 64px); line-height: 1.07; letter-spacing: -.03em; font-weight: 600; }
.experience-achievements-intro > p:last-child { color: #a1a1a6; font-size: 21px; line-height: 1.4; }
.experience-achievement-card, .experience-achievement-small {
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .2);
  border-radius: 0;
  padding: 24px 0 0;
}
.experience-achievement-card:hover, .experience-achievement-small:hover { transform: none; box-shadow: none; }
.experience-achievement-card .experience-achievement-number,
.experience-achievement-card .experience-achievement-top .experience-achievement-number {
  color: #fff;
  font-size: clamp(48px, 5vw, 68px);
  letter-spacing: -.04em;
  font-weight: 600;
  line-height: 1;
}
.experience-achievement-top { margin-bottom: 14px; }
.experience-achievement-icon, .experience-achievement-small-mark { display: none; }
.experience-achievement-card h3, .experience-achievement-small h3 { color: #f5f5f7; font-size: 18px; letter-spacing: -.01em; }
.experience-achievement-card p, .experience-achievement-small p { color: #a1a1a6; font-size: 16px; line-height: 1.5; }
.experience-achievements-secondary { margin-top: 40px; gap: 32px; }
.experience-achievements-grid { gap: 32px; }

/* ---------- FAQ: hairlines, no boxes ---------- */
.faq { max-width: 840px; }
.faq h2 { margin-bottom: 40px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-button {
  padding: 26px 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.faq-button[aria-expanded="true"] { color: var(--ink); }
.faq-button span:last-child { font-weight: 300; font-size: 30px; line-height: 1; color: var(--ink); }
.faq-panel { color: var(--muted); font-size: 19px; line-height: 1.5; max-width: 680px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--soft);
  color: var(--ink);
  border-radius: 36px;
  padding: clamp(48px, 8vw, 96px) clamp(24px, 6vw, 72px);
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 28px;
}
.cta-band h2 { max-width: 860px; margin: 0 auto 16px; font-size: clamp(34px, 5vw, 64px); line-height: 1.07; letter-spacing: -.03em; }
.cta-band p { color: var(--muted); font-size: 21px; line-height: 1.4; max-width: 600px; margin: 0 auto; }

/* ---------- Pricing ---------- */
.price-card { padding: clamp(28px, 4vw, 44px); }
.price { color: var(--ink); font-size: 36px; letter-spacing: -.03em; font-weight: 600; }
.price small { color: var(--muted); }
.service-scope-note, .service-scope-note a { color: var(--muted); }
.service-scope-note a { color: var(--blue); }

/* ---------- Articles ---------- */
.article-library { padding-top: 56px; }
.article-categories a {
  border: 0;
  background: var(--soft);
  color: var(--ink);
  font-weight: 500;
  padding: 9px 18px;
}
.article-categories a:hover, .article-categories a[aria-current="page"] { background: var(--ink); color: #fff; }
.article-thumb, .article-thumb.has-image { border-radius: 18px; background: var(--soft); }
.article-tile h2, .article-tile h3 { font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -.012em; color: var(--ink); }
.article-card-category { color: var(--muted); font-weight: 500; letter-spacing: .02em; text-transform: none; font-size: 13px; }
.article-date { color: var(--muted); }
.editorial-grid .article-card, .home-articles-section .article-card { border: 0; background: var(--soft); border-radius: 28px; }
.editorial-grid .article-card:hover, .home-articles-section .article-card:hover { box-shadow: none; transform: scale(1.008); }
.featured-article { background: var(--soft); color: var(--ink); border: 0; border-radius: 32px; }
.featured-article p, .featured-article aside span { color: var(--muted); }
.featured-article a { color: var(--blue); border-bottom-color: currentColor; }
.featured-article aside { border-left-color: var(--line); }
.featured-article aside strong { color: var(--ink); }
.read-link { color: var(--blue); }

.article-content { font-size: 19px; line-height: 1.7; max-width: 720px; letter-spacing: -.005em; }
.article-content h2 { font-size: clamp(28px, 3.4vw, 38px); margin-top: 1.8em; }
.article-content h3 { font-size: 24px; margin-top: 1.6em; }
.article-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.article-cover img { border-radius: 24px; }
.related-articles { border-top-color: var(--line); }
.related-articles a { color: var(--blue); }

/* ---------- Forms ---------- */
.contact-form { border: 0; border-radius: 28px; background: var(--soft); box-shadow: none; padding: clamp(24px, 4vw, 40px); }
.form-row input, .form-row textarea,
.contact-form input, .contact-form textarea,
.request-box select, .request-box textarea {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(10, 111, 163, .15); }
.contact-title { font-size: clamp(36px, 5vw, 60px); line-height: 1.05; letter-spacing: -.035em; font-weight: 600; }
.contact-details a { color: var(--blue); }
.request-box .whatsapp { background: var(--blue); }

/* ---------- Footer: light, quiet ---------- */
.footer { background: var(--soft); color: #424245; padding: 56px 0 32px; }
.footer h3 { color: var(--ink); font-size: 14px; font-weight: 600; letter-spacing: .01em; }
.footer a, .footer p { color: #424245; font-size: 14px; letter-spacing: .005em; }
.footer a:hover { color: #000; text-decoration: underline; }
.footer-logo { width: min(220px, 100%); }
.footer .social-link { border: 0; background: var(--ink); }
.footer .social-link:hover { background: var(--blue); transform: none; }
.copyright { border-top-color: var(--line); color: var(--muted); font-size: 12px; letter-spacing: .01em; }

/* ---------- WhatsApp widget: calm, no glow ---------- */
.support-toggle { box-shadow: 0 6px 20px rgba(0, 0, 0, .14); }
.support-toggle:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.support-panel { border: 0; border-radius: 24px; box-shadow: 0 18px 50px rgba(0, 0, 0, .16); }

/* ---------- Mobile ---------- */
@media (max-width: 950px) {
  :root { --site-header-height: 60px; }
  body > .site-header .nav { min-height: 60px; }
  body > .site-header .nav-toggle { border: 0; background: var(--soft); border-radius: 999px; font-family: var(--font); }
  body > .site-header .nav-links {
    background: #fff;
    border: 0;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .1);
  }
  body > .site-header .nav-links > a:not(.btn) { font-size: 17px; }
  body > .site-header .nav-links > [aria-current="page"]:not(.btn) { background: var(--soft); }
  .hero-art { height: 440px; margin-top: 48px; border-radius: 28px; }
  .hero-art img, .portrait-photo { height: 420px; }
  .extra-service-card { flex-basis: 260px; min-height: 240px; }
  .experience-achievements-intro { margin-bottom: 44px; }
}

/* ---------- Accessibility fallbacks ---------- */
@media (prefers-reduced-motion: reduce) {
  .card, .advisor-card, .price-card, .extra-service-card, .btn { transition: none; }
  .card:hover, .advisor-card:hover, .extra-service-card:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  body > .site-header { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  body > .site-header { background: #fff; border-bottom-color: #1d1d1f; }
  .card, .advisor-card, .price-card, .extra-service-card, .contact-form { border: 1px solid #1d1d1f; }
  .eyebrow, .muted, .lead, .hero p, .page-hero p { color: #424245; }
}

/* Academic profile keeps its denser scale */
.profile h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; letter-spacing: -.022em; margin-bottom: 14px; }

/* Academic portrait belongs to the page introduction and scrolls away with it. */
.profile-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  margin-bottom: 32px;
}
.profile-intro-copy { min-width: 0; }
.profile-portrait {
  position: relative;
  width: 100%;
  height: 340px;
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: #e9eef1;
}
.profile-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 55%;
  transform: scale(1.85);
}
@media (max-width: 700px) {
  .profile-intro { grid-template-columns: 1fr; gap: 24px; }
  .profile-portrait { max-width: 400px; height: 260px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 18px; }
  .page-hero h1, .article-hero h1, .pricing-page .page-hero h1 { font-size: 34px; }
}
