/* ============================================
   ZAYAN Interior Design - Founder
   1. Home page "Meet The Founder" teaser (index.html)
   2. Cinematic founder profile page (founder.html)
   All reveal effects are gated behind html.motion-ready
   (added by js/animations.js) or prefers-reduced-motion,
   so content is always visible without motion.
   ============================================ */

/* Highlighted phrases (*text* in data.js -> <em>) */
.founder-teaser em,
.founder-page em {
  font-style: normal;
  color: var(--color-gold-bright);
  font-weight: var(--fw-medium);
}

/* Generic staggered reveal: the [data-animate] container gets
   .animate-visible from the scroll observer, then each [data-stagger]
   child fades up in turn using its --i index. */
html.motion-ready .founder-stagger [data-stagger] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 0.8s var(--motion-ease),
    transform 0.8s var(--motion-ease);
  transition-delay: calc(var(--i, 0) * 110ms + 120ms);
}

html.motion-ready .founder-stagger.animate-visible [data-stagger] {
  opacity: 1;
  transform: none;
}

/* ============================================
   1. HOME PAGE - FOUNDER TEASER
   ============================================ */

.founder-teaser {
  position: relative;
  background:
    radial-gradient(ellipse 55% 65% at 22% 55%, rgb(var(--color-gold-rgb) / 0.07), transparent 70%),
    linear-gradient(180deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.founder-teaser .container {
  position: relative;
  z-index: 1;
}

/* Oversized outlined word bleeding off the section edge */
.founder-teaser-watermark {
  position: absolute;
  inset-inline-end: -1vw;
  bottom: -0.2em;
  z-index: 0;
  font-family: var(--font-heading);
  font-size: clamp(6rem, 17vw, 15rem);
  font-weight: var(--fw-black);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgb(var(--color-gold-rgb) / 0.1);
  pointer-events: none;
  user-select: none;
}

.founder-teaser-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(3rem, 7vw, 6.5rem);
  align-items: center;
}

.founder-teaser-visual {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 460px;
  justify-self: center;
}

/* Offset gold frame behind the portrait */
.founder-teaser-visual::before {
  content: "";
  position: absolute;
  inset-block: 22px -22px;
  inset-inline: 22px -22px;
  z-index: -1;
  border: 1px solid rgb(var(--color-gold-rgb) / 0.45);
  border-radius: 8px;
  transition: inset 0.8s var(--motion-ease);
}

.founder-teaser-visual:hover::before {
  inset-block: 12px -12px;
  inset-inline: 12px -12px;
}

.founder-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 8px;
  background: var(--color-tertiary);
  box-shadow: var(--shadow-2xl);
}

.founder-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  filter: grayscale(0.4) contrast(1.06) brightness(0.92);
  transform: scale(1.02);
  transition:
    filter 0.9s var(--motion-ease),
    transform 1.4s var(--motion-ease);
}

.founder-teaser-visual:hover .founder-portrait img {
  filter: grayscale(0) contrast(1.03) brightness(1);
  transform: scale(1.06);
}

.founder-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(var(--color-primary-rgb) / 0.6), transparent 45%);
  pointer-events: none;
}

.founder-teaser-plate {
  position: absolute;
  bottom: 36px;
  inset-inline-start: -32px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 260px;
  padding: 1rem 1.35rem;
  background: rgb(var(--color-primary-rgb) / 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--color-border-gold);
  border-inline-start: 3px solid var(--color-gold);
  border-radius: 6px;
  box-shadow: var(--shadow-xl);
}

.founder-teaser-plate span {
  font-size: var(--fs-tiny);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-gray);
}

.founder-teaser-plate strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: var(--fw-bold);
  color: var(--color-white);
}

.founder-teaser-content .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.founder-teaser-content .eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--color-gold);
}

.founder-teaser-name {
  margin: 1rem 0 1.75rem;
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.founder-teaser-quote {
  margin: 0 0 1.5rem;
  padding-inline-start: 1.5rem;
  border-inline-start: 2px solid var(--color-gold);
}

.founder-teaser-quote p {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: var(--fw-light);
  font-style: italic;
  line-height: 1.55;
  color: var(--color-white);
}

.founder-teaser-body {
  max-width: 60ch;
  margin-bottom: 1.75rem;
}

.founder-teaser-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 2.25rem;
  padding: 0;
  list-style: none;
}

.founder-teaser-highlights li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1.05rem;
  font-size: var(--fs-small);
  color: var(--color-white);
  background: rgb(var(--color-gold-rgb) / 0.05);
  border: 1px solid var(--color-border-gold);
  border-radius: var(--radius-pill);
}

.founder-teaser-highlights li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
}

.founder-teaser-cta {
  gap: 0.75rem;
}

.founder-teaser-cta svg {
  transition: transform var(--transition-base);
}

.founder-teaser-cta:hover svg {
  transform: translateX(4px);
}

[dir="rtl"] .founder-teaser-cta svg {
  transform: scaleX(-1);
}

[dir="rtl"] .founder-teaser-cta:hover svg {
  transform: scaleX(-1) translateX(4px);
}

@media (max-width: 991px) {
  .founder-teaser-grid {
    grid-template-columns: 1fr;
  }

  .founder-teaser-visual {
    max-width: 420px;
  }

  .founder-teaser-plate {
    inset-inline-start: 16px;
    bottom: 20px;
  }
}

@media (max-width: 575px) {
  .founder-teaser-visual {
    max-width: calc(100% - 22px);
    justify-self: start;
  }

  .founder-teaser-visual::before {
    inset-block: 14px -14px;
    inset-inline: 14px -14px;
  }
}

/* ============================================
   2. FOUNDER PAGE
   ============================================ */

/* Film grain overlay (hero + vision scene) */
.founder-grain {
  position: absolute;
  inset: -50%;
  z-index: 0;
  opacity: 0.09;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.founder-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 8.5rem 0 8rem;
  overflow: hidden;
  background: var(--color-primary);
}

.founder-hero-media {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  z-index: -2;
  width: 58%;
  overflow: hidden;
  /* Feather the portrait's inner edge so it never shows a seam */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%);
  mask-image: linear-gradient(to right, transparent 0%, #000 38%);
}

[dir="rtl"] .founder-hero-media {
  -webkit-mask-image: linear-gradient(to left, transparent 0%, #000 38%);
  mask-image: linear-gradient(to left, transparent 0%, #000 38%);
}

.founder-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  filter: grayscale(0.25) contrast(1.08) brightness(0.86);
}

/* Colour grade: solid black on the copy side fading into the portrait,
   plus top/bottom falloff and a soft vignette */
.founder-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      var(--color-primary) 0%,
      var(--color-primary) 40%,
      rgb(var(--color-primary-rgb) / 0.72) 50%,
      rgb(var(--color-primary-rgb) / 0.12) 68%,
      transparent 82%
    ),
    linear-gradient(0deg, var(--color-primary) 0%, transparent 30%),
    linear-gradient(180deg, rgb(var(--color-primary-rgb) / 0.75) 0%, transparent 24%),
    radial-gradient(ellipse 60% 80% at 72% 45%, transparent 50%, rgb(var(--color-primary-rgb) / 0.5) 100%);
}

[dir="rtl"] .founder-hero-shade {
  transform: scaleX(-1);
}

.founder-hero .founder-grain {
  z-index: 1;
}

.founder-hero-inner {
  position: relative;
  z-index: 2;
}

.founder-hero-copy {
  max-width: 600px;
}

.founder-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.founder-hero-eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--color-gold);
}

.founder-hero-name {
  margin: 1.25rem 0 1.75rem;
  font-size: clamp(3.4rem, 8.4vw, 7.75rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.025em;
}

.founder-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.founder-line > span {
  display: inline-block;
}

.founder-line + .founder-line > span {
  background: linear-gradient(100deg, var(--color-gold-bright) 0%, var(--color-gold) 45%, var(--color-gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.founder-hero-role {
  margin-bottom: 1.25rem;
  font-family: var(--font-nav);
  font-size: clamp(0.85rem, 1.3vw, 1rem);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--color-white);
}

.founder-hero-tagline {
  max-width: 46ch;
  margin-bottom: 2rem;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--color-gray);
}

.founder-hero-credential {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--fs-small);
  letter-spacing: var(--ls-wide);
  color: var(--color-gray);
}

.founder-hero-credential::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border: 1px solid var(--color-gold);
  transform: rotate(45deg);
}

.founder-hero .page-breadcrumbs {
  margin-top: 2.5rem;
}

/* Chapter index strip along the bottom of the hero */
.founder-chapters {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 3;
  border-top: 1px solid var(--color-border);
  background: linear-gradient(to top, rgb(var(--color-primary-rgb) / 0.92), rgb(var(--color-primary-rgb) / 0.35));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.founder-chapters ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.founder-chapters a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  height: 100%;
  padding: 1.15rem 1.25rem;
  font-size: var(--fs-small);
  color: var(--color-gray);
  border-inline-start: 1px solid var(--color-border);
  transition:
    color var(--transition-base),
    background-color var(--transition-base);
}

.founder-chapters li:first-child a {
  border-inline-start: 0;
}

.founder-chapters a span {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  color: var(--color-gold);
}

.founder-chapters a:hover,
.founder-chapters a:focus-visible {
  color: var(--color-white);
  background: rgb(var(--color-gold-rgb) / 0.06);
}

.founder-scroll-cue {
  display: none;
}

/* Opening sequence: black "curtains" part from a gold hairline, the
   portrait eases out of a slow zoom and the name rises line by line */
.founder-curtain,
.founder-curtain-line {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .founder-curtain {
    display: block;
    position: absolute;
    inset-inline: 0;
    z-index: 10;
    height: 50.5%;
    background: #000;
    pointer-events: none;
    transform: scaleY(0);
    animation: founderCurtain 1.5s cubic-bezier(0.77, 0, 0.18, 1) 0.55s both;
  }

  .founder-curtain-top {
    top: 0;
    transform-origin: top;
  }

  .founder-curtain-bottom {
    bottom: 0;
    transform-origin: bottom;
  }

  .founder-curtain-line {
    display: block;
    position: absolute;
    top: 50%;
    inset-inline: 0;
    z-index: 11;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    pointer-events: none;
    opacity: 0;
    animation: founderCurtainLine 1.5s ease-out both;
  }

  .founder-hero-media img {
    animation: founderKenBurns 3.2s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
  }

  .founder-line > span {
    animation: founderRise 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 1.2s;
  }

  .founder-line + .founder-line > span {
    animation-delay: 1.35s;
  }

  .founder-hero-reveal {
    animation: founderFadeUp 1s var(--motion-ease) both;
    animation-delay: var(--d, 1.5s);
  }

  .founder-hero .founder-grain,
  .founder-vision .founder-grain {
    animation: founderGrain 0.9s steps(5) infinite;
  }
}

@keyframes founderCurtain {
  from {
    transform: scaleY(1);
  }
  to {
    transform: scaleY(0);
  }
}

@keyframes founderCurtainLine {
  0% {
    opacity: 0;
    transform: scaleX(0);
  }
  30% {
    opacity: 1;
  }
  45% {
    transform: scaleX(1);
  }
  100% {
    opacity: 0;
    transform: scaleX(1);
  }
}

@keyframes founderKenBurns {
  from {
    opacity: 0;
    transform: scale(1.14);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes founderRise {
  from {
    transform: translateY(110%);
  }
  to {
    transform: none;
  }
}

@keyframes founderFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes founderGrain {
  0% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-4%, 3%);
  }
  40% {
    transform: translate(3%, -5%);
  }
  60% {
    transform: translate(-2%, 6%);
  }
  80% {
    transform: translate(5%, -2%);
  }
  100% {
    transform: translate(0, 0);
  }
}

/* ---------- Chapters (shared) ---------- */

.founder-chapter {
  position: relative;
  padding: clamp(5rem, 10vw, 8.5rem) 0;
}

.founder-chapter-head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.founder-chapter-num {
  font-family: var(--font-heading);
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgb(var(--color-gold-rgb) / 0.75);
}

.founder-chapter-rule {
  width: 64px;
  height: 1px;
  background: var(--color-gold);
}

.founder-chapter-label {
  margin: 0;
  font-family: var(--font-primary);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-gold);
}

.founder-chapter-title {
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
}

.founder-lead {
  margin-bottom: 1.5rem;
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.8;
  color: color-mix(in srgb, var(--color-white), transparent 12%);
}

/* ---------- 01 Profile ---------- */

.founder-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.founder-profile-copy p.text-gray {
  font-size: 1.05rem;
  line-height: 1.9;
}

.founder-facts {
  position: sticky;
  top: 7rem;
  padding: 2.25rem;
  background: var(--color-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.founder-facts::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 2.25rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  opacity: 0.7;
}

.founder-facts-title {
  margin-bottom: 0.75rem;
  font-family: var(--font-primary);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-gold);
}

.founder-facts dl {
  margin: 0;
}

.founder-fact {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.founder-fact:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.founder-fact dt {
  font-size: var(--fs-tiny);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-gray-dark);
}

.founder-fact dd {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: var(--fw-semibold);
  color: var(--color-white);
}

/* ---------- 02 Vision ---------- */

.founder-vision {
  isolation: isolate;
  padding-top: 0;
  background: var(--color-secondary);
}

.founder-vision-scene {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 10vw, 8.5rem) 0 clamp(4rem, 8vw, 6.5rem);
  border-top: 1px solid var(--color-border-gold);
}

.founder-vision-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.founder-vision-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 36%;
  filter: grayscale(1) contrast(1.2) brightness(0.55);
  opacity: 0.35;
}

.founder-vision-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, var(--color-secondary) 0%, transparent 35%),
    radial-gradient(ellipse 70% 70% at 50% 50%, rgb(var(--color-primary-rgb) / 0.55), var(--color-primary) 100%);
}

.founder-vision-scene .container,
.founder-vision > .container {
  position: relative;
  z-index: 1;
}

.founder-quote {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.founder-quote-mark {
  display: block;
  height: 0.55em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(6rem, 12vw, 9rem);
  line-height: 1;
  color: var(--color-gold);
  opacity: 0.85;
}

.founder-quote p {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 3.1rem);
  font-weight: var(--fw-light);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-white);
}

.founder-quote cite {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2rem;
  font-style: normal;
  font-size: var(--fs-small);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-gold);
}

.founder-quote cite::before,
.founder-quote cite::after {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
}

.founder-vision-body {
  max-width: 68ch;
  margin: 3rem auto 0;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.9;
}

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

.founder-pillar {
  position: relative;
  height: 100%;
  padding: 2.25rem 2rem;
  background: rgb(var(--color-primary-rgb) / 0.55);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    border-color var(--transition-slow),
    transform var(--transition-slow);
}

.founder-pillar::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--color-gold);
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 0.6s var(--motion-ease);
}

[dir="rtl"] .founder-pillar::before {
  transform-origin: right;
}

.founder-pillar:hover {
  border-color: var(--color-border-gold);
  transform: translateY(-6px);
}

.founder-pillar:hover::before {
  transform: scaleX(1);
}

.founder-pillar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.founder-pillar-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--color-gold);
  border: 1px solid var(--color-border-gold);
  border-radius: 50%;
}

.founder-pillar-icon svg {
  width: 24px;
  height: 24px;
}

.founder-pillar-num {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  color: var(--color-gray-dark);
}

.founder-pillar h3 {
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
}

.founder-pillar p {
  font-size: 0.95rem;
}

/* ---------- 03 Execution ---------- */

.founder-execution-intro {
  max-width: 760px;
}

.founder-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  margin: clamp(3rem, 6vw, 4.5rem) 0;
  padding: 0;
  list-style: none;
}

/* The connecting line draws itself when the timeline is revealed */
.founder-timeline::before {
  content: "";
  position: absolute;
  top: 23px;
  inset-inline: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-gold), rgb(var(--color-gold-rgb) / 0.12));
  transform-origin: left;
}

[dir="rtl"] .founder-timeline::before {
  background: linear-gradient(270deg, var(--color-gold), rgb(var(--color-gold-rgb) / 0.12));
  transform-origin: right;
}

html.motion-ready .founder-timeline::before {
  transform: scaleX(0);
  transition: transform 1.8s var(--motion-ease) 0.15s;
}

html.motion-ready .founder-timeline.animate-visible::before {
  transform: scaleX(1);
}

.founder-step {
  position: relative;
  padding-top: 4.5rem;
}

.founder-step-node {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: var(--fw-bold);
  color: var(--color-gold);
  background: var(--color-primary);
  border: 1px solid var(--color-gold);
  border-radius: 50%;
  box-shadow: 0 0 0 8px var(--color-primary);
}

.founder-step h4 {
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
}

.founder-step p {
  font-size: 0.95rem;
}

.founder-execution-closing {
  max-width: 820px;
  padding: 2rem 2.25rem;
  font-size: 1.05rem;
  line-height: 1.9;
  background: var(--color-tertiary);
  border: 1px solid var(--color-border);
  border-inline-start: 3px solid var(--color-gold);
  border-radius: var(--radius-md);
}

/* ---------- 04 Expertise ---------- */

.founder-expertise {
  background: var(--color-secondary);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.founder-expertise-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.founder-expertise-intro .founder-chapter-title {
  margin-bottom: 0;
}

.founder-expertise-intro p {
  font-size: 1.05rem;
  line-height: 1.85;
}

.founder-tool-groups {
  display: grid;
  gap: 3rem;
}

.founder-tool-group-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.founder-tool-group-head h4 {
  margin: 0;
  font-family: var(--font-primary);
  font-size: var(--fs-tiny);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-gray);
}

.founder-tool-group-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.founder-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.founder-tool {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 1 / 1.05;
  padding: 1.1rem 1.2rem 1.2rem;
  background: linear-gradient(160deg, var(--color-elevated) 0%, var(--color-tertiary) 55%, var(--color-secondary) 100%);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition:
    border-color var(--transition-slow),
    transform var(--transition-slow),
    box-shadow var(--transition-slow);
}

.founder-tool::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 90%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgb(var(--color-gold-rgb) / 0.14), transparent 65%);
  opacity: 0;
  transition: opacity var(--transition-slow);
  pointer-events: none;
}

.founder-tool:hover {
  border-color: rgb(var(--color-gold-rgb) / 0.5);
  transform: translateY(-5px);
  box-shadow: var(--shadow-gold);
}

.founder-tool:hover::after {
  opacity: 1;
}

.founder-tool-index {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  color: var(--color-gray-dark);
}

.founder-tool-mark {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-gold);
}

.founder-tool-logo {
  align-self: flex-start;
  width: auto;
  max-width: 100%;
  height: clamp(52px, 5vw, 64px);
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgb(0 0 0 / 0.35));
  transition: transform var(--transition-slow);
}

.founder-tool:hover .founder-tool-logo {
  transform: scale(1.06);
}

.founder-tool-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: var(--fw-bold);
  line-height: 1.25;
  color: var(--color-white);
}

/* ---------- 05 Closing ---------- */

.founder-closing {
  text-align: center;
}

.founder-closing .founder-chapter-head {
  justify-content: center;
}

.founder-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15em 0.55em;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.founder-word {
  color: var(--color-white);
}

.founder-word:nth-child(3n + 2) {
  color: var(--color-gold);
}

.founder-word:nth-child(3n) {
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--color-white), transparent 25%);
}

.founder-closing-body {
  max-width: 64ch;
  margin: 0 auto;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.9;
}

.founder-signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 3rem;
}

html[lang="ar"] .founder-signature-name {
  font-family: "Aref Ruqaa", "Cairo", serif;
}

.founder-signature-name {
  font-family: "Allura", "Segoe Script", cursive;
  font-size: clamp(2.75rem, 5vw, 3.75rem);
  line-height: 1.1;
  color: var(--color-gold);
}

.founder-signature-role {
  font-size: var(--fs-tiny);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-gray-dark);
}

.founder-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ---------- Founder page responsive ---------- */

@media (max-width: 1199px) {
  .founder-chapters a {
    padding: 1rem 0.9rem;
    font-size: var(--fs-tiny);
  }

  .founder-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 3rem;
  }

  .founder-timeline::before {
    display: none;
  }
}

@media (max-width: 991px) {
  .founder-profile-grid,
  .founder-expertise-intro {
    grid-template-columns: 1fr;
  }

  .founder-facts {
    position: relative;
    top: auto;
  }

  .founder-pillars {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  /* Portrait on top, copy over its faded lower edge */
  .founder-hero {
    align-items: flex-end;
    padding: 0 0 7rem;
    min-height: 100vh;
    min-height: 100svh;
  }

  .founder-hero-media {
    width: 100%;
    bottom: auto;
    height: 72%;
  }

  .founder-hero-media,
  [dir="rtl"] .founder-hero-media {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .founder-hero-media img {
    object-position: 50% 15%;
  }

  .founder-hero-shade,
  [dir="rtl"] .founder-hero-shade {
    transform: none;
    background:
      linear-gradient(0deg, var(--color-primary) 30%, rgb(var(--color-primary-rgb) / 0.75) 45%, transparent 70%),
      linear-gradient(180deg, rgb(var(--color-primary-rgb) / 0.7) 0%, transparent 18%);
  }

  .founder-hero-name {
    margin: 1rem 0 1.25rem;
  }

  .founder-hero-role {
    letter-spacing: 0.22em;
  }

  .founder-hero .page-breadcrumbs {
    margin-top: 1.75rem;
  }

  .founder-chapters {
    display: none;
  }

  .founder-scroll-cue {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    letter-spacing: var(--ls-widest);
    text-transform: uppercase;
    color: var(--color-gray);
    transform: translateX(-50%);
  }

  .founder-scroll-cue i {
    position: relative;
    width: 1px;
    height: 34px;
    overflow: hidden;
    background: var(--color-border);
  }

  .founder-scroll-cue i::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 12px;
    background: var(--color-gold);
    animation: founderScrollCue 1.8s var(--motion-ease) infinite;
  }

  .founder-chapter-head {
    gap: 0.85rem;
  }

  .founder-chapter-rule {
    width: 36px;
  }

  .founder-facts {
    padding: 1.75rem;
  }

  .founder-timeline {
    grid-template-columns: 1fr;
    row-gap: 2.25rem;
  }

  .founder-step {
    min-height: 47px;
    padding-top: 0.35rem;
    padding-inline-start: 4.5rem;
  }

  .founder-execution-closing {
    padding: 1.5rem;
  }

  .founder-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .founder-cta-buttons .btn {
    width: 100%;
  }
}

@keyframes founderScrollCue {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(300%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .founder-scroll-cue i::after {
    animation: none;
  }
}
